@ -25,8 +25,8 @@ class TxViewDelegate : public QAbstractItemDelegate
{
{
Q_OBJECT
Q_OBJECT
public :
public :
TxViewDelegate ( const PlatformStyle * _platformStyle ) :
TxViewDelegate ( const PlatformStyle * _platformStyle , QObject * parent = nullptr ) :
QAbstractItemDelegate ( ) , unit ( BitcoinUnits : : BTC ) ,
QAbstractItemDelegate ( parent ) , unit ( BitcoinUnits : : BTC ) ,
platformStyle ( _platformStyle )
platformStyle ( _platformStyle )
{
{
@ -119,8 +119,7 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)
currentWatchOnlyBalance ( - 1 ) ,
currentWatchOnlyBalance ( - 1 ) ,
currentWatchUnconfBalance ( - 1 ) ,
currentWatchUnconfBalance ( - 1 ) ,
currentWatchImmatureBalance ( - 1 ) ,
currentWatchImmatureBalance ( - 1 ) ,
txdelegate ( new TxViewDelegate ( platformStyle ) ) ,
txdelegate ( new TxViewDelegate ( platformStyle , this ) )
filter ( 0 )
{
{
ui - > setupUi ( this ) ;
ui - > setupUi ( this ) ;
@ -220,7 +219,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
if ( model & & model - > getOptionsModel ( ) )
if ( model & & model - > getOptionsModel ( ) )
{
{
// Set up transaction list
// Set up transaction list
filter = new TransactionFilterProxy ( ) ;
filter . reset ( new TransactionFilterProxy ( ) ) ;
filter - > setSourceModel ( model - > getTransactionTableModel ( ) ) ;
filter - > setSourceModel ( model - > getTransactionTableModel ( ) ) ;
filter - > setLimit ( NUM_ITEMS ) ;
filter - > setLimit ( NUM_ITEMS ) ;
filter - > setDynamicSortFilter ( true ) ;
filter - > setDynamicSortFilter ( true ) ;
@ -228,7 +227,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
filter - > setShowInactive ( false ) ;
filter - > setShowInactive ( false ) ;
filter - > sort ( TransactionTableModel : : Date , Qt : : DescendingOrder ) ;
filter - > sort ( TransactionTableModel : : Date , Qt : : DescendingOrder ) ;
ui - > listTransactions - > setModel ( filter ) ;
ui - > listTransactions - > setModel ( filter . get ( ) ) ;
ui - > listTransactions - > setModelColumn ( TransactionTableModel : : ToAddress ) ;
ui - > listTransactions - > setModelColumn ( TransactionTableModel : : ToAddress ) ;
// Keep up to date with wallet
// Keep up to date with wallet