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();
|
dialog->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CoinsWidget::resetModel() {
|
||||||
|
ui->coins->setModel(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void CoinsWidget::copy(copyField field) {
|
void CoinsWidget::copy(copyField field) {
|
||||||
QModelIndex index = ui->coins->currentIndex();
|
QModelIndex index = ui->coins->currentIndex();
|
||||||
int row = m_proxyModel->mapToSource(index).row();
|
int row = m_proxyModel->mapToSource(index).row();
|
||||||
|
|
|
@ -25,6 +25,9 @@ public:
|
||||||
void setModel(CoinsModel * model, Coins * coins);
|
void setModel(CoinsModel * model, Coins * coins);
|
||||||
~CoinsWidget() override;
|
~CoinsWidget() override;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void resetModel();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showHeaderMenu(const QPoint& position);
|
void showHeaderMenu(const QPoint& position);
|
||||||
void setShowSpent(bool show);
|
void setShowSpent(bool show);
|
||||||
|
|
|
@ -90,6 +90,11 @@ void ContactsWidget::setSearchFilter(const QString &filter) {
|
||||||
m_proxyModel->setSearchFilter(filter);
|
m_proxyModel->setSearchFilter(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ContactsWidget::resetModel()
|
||||||
|
{
|
||||||
|
ui->contacts->setModel(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void ContactsWidget::showHeaderMenu(const QPoint& position)
|
void ContactsWidget::showHeaderMenu(const QPoint& position)
|
||||||
{
|
{
|
||||||
m_showFullAddressesAction->setChecked(m_model->isShowFullAddresses());
|
m_showFullAddressesAction->setChecked(m_model->isShowFullAddresses());
|
||||||
|
|
|
@ -32,6 +32,7 @@ public slots:
|
||||||
void deleteContact();
|
void deleteContact();
|
||||||
void setShowFullAddresses(bool show);
|
void setShowFullAddresses(bool show);
|
||||||
void setSearchFilter(const QString &filter);
|
void setSearchFilter(const QString &filter);
|
||||||
|
void resetModel();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void fillAddress(QString &address);
|
void fillAddress(QString &address);
|
||||||
|
|
|
@ -334,7 +334,11 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
|
||||||
else
|
else
|
||||||
ui->tabWidget->setCurrentIndex(Tabs::HOME);
|
ui->tabWidget->setCurrentIndex(Tabs::HOME);
|
||||||
|
|
||||||
|
// Clear all tables when wallet is closed
|
||||||
ui->historyWidget->resetModel();
|
ui->historyWidget->resetModel();
|
||||||
|
ui->contactWidget->resetModel();
|
||||||
|
ui->receiveWidget->resetModel();
|
||||||
|
ui->coinsWidget->resetModel();
|
||||||
});
|
});
|
||||||
|
|
||||||
// window title
|
// window title
|
||||||
|
|
|
@ -103,6 +103,10 @@ void ReceiveWidget::onShowTransactions() {
|
||||||
emit showTransactions(address);
|
emit showTransactions(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReceiveWidget::resetModel() {
|
||||||
|
ui->addresses->setModel(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void ReceiveWidget::setShowFullAddresses(bool show) {
|
void ReceiveWidget::setShowFullAddresses(bool show) {
|
||||||
if (!m_model) return;
|
if (!m_model) return;
|
||||||
m_model->setShowFullAddresses(show);
|
m_model->setShowFullAddresses(show);
|
||||||
|
|
|
@ -36,6 +36,7 @@ public slots:
|
||||||
void setShowUsedAddresses(bool show);
|
void setShowUsedAddresses(bool show);
|
||||||
void setSearchFilter(const QString &filter);
|
void setSearchFilter(const QString &filter);
|
||||||
void onShowTransactions();
|
void onShowTransactions();
|
||||||
|
void resetModel();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void generateSubaddress();
|
void generateSubaddress();
|
||||||
|
|
Loading…
Reference in a new issue