mirror of
				https://git.wownero.com/wowlet/wowlet.git
				synced 2024-08-15 01:03:14 +00:00 
			
		
		
		
	Clear all tables when wallet is closed
This commit is contained in:
		
							parent
							
								
									5b679da427
								
							
						
					
					
						commit
						c2e335e439
					
				
					 7 changed files with 22 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -206,6 +206,10 @@ void CoinsWidget::onSweepOutput() {
 | 
			
		|||
    dialog->deleteLater();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CoinsWidget::resetModel() {
 | 
			
		||||
    ui->coins->setModel(nullptr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CoinsWidget::copy(copyField field) {
 | 
			
		||||
    QModelIndex index = ui->coins->currentIndex();
 | 
			
		||||
    int row = m_proxyModel->mapToSource(index).row();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,6 +25,9 @@ public:
 | 
			
		|||
    void setModel(CoinsModel * model, Coins * coins);
 | 
			
		||||
    ~CoinsWidget() override;
 | 
			
		||||
 | 
			
		||||
public slots:
 | 
			
		||||
    void resetModel();
 | 
			
		||||
 | 
			
		||||
private slots:
 | 
			
		||||
    void showHeaderMenu(const QPoint& position);
 | 
			
		||||
    void setShowSpent(bool show);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -90,6 +90,11 @@ void ContactsWidget::setSearchFilter(const QString &filter) {
 | 
			
		|||
    m_proxyModel->setSearchFilter(filter);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ContactsWidget::resetModel()
 | 
			
		||||
{
 | 
			
		||||
    ui->contacts->setModel(nullptr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ContactsWidget::showHeaderMenu(const QPoint& position)
 | 
			
		||||
{
 | 
			
		||||
    m_showFullAddressesAction->setChecked(m_model->isShowFullAddresses());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,6 +32,7 @@ public slots:
 | 
			
		|||
    void deleteContact();
 | 
			
		||||
    void setShowFullAddresses(bool show);
 | 
			
		||||
    void setSearchFilter(const QString &filter);
 | 
			
		||||
    void resetModel();
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
    void fillAddress(QString &address);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -334,7 +334,11 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
 | 
			
		|||
        else
 | 
			
		||||
            ui->tabWidget->setCurrentIndex(Tabs::HOME);
 | 
			
		||||
 | 
			
		||||
        // Clear all tables when wallet is closed
 | 
			
		||||
        ui->historyWidget->resetModel();
 | 
			
		||||
        ui->contactWidget->resetModel();
 | 
			
		||||
        ui->receiveWidget->resetModel();
 | 
			
		||||
        ui->coinsWidget->resetModel();
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // window title
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -103,6 +103,10 @@ void ReceiveWidget::onShowTransactions() {
 | 
			
		|||
    emit showTransactions(address);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ReceiveWidget::resetModel() {
 | 
			
		||||
    ui->addresses->setModel(nullptr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ReceiveWidget::setShowFullAddresses(bool show) {
 | 
			
		||||
    if (!m_model) return;
 | 
			
		||||
    m_model->setShowFullAddresses(show);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,6 +36,7 @@ public slots:
 | 
			
		|||
    void setShowUsedAddresses(bool show);
 | 
			
		||||
    void setSearchFilter(const QString &filter);
 | 
			
		||||
    void onShowTransactions();
 | 
			
		||||
    void resetModel();
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
    void generateSubaddress();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue