]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
AccountSwitcher: keep sort order during session
authortobtoht <tob@featherwallet.org>
Tue, 17 Jan 2023 21:06:08 +0000 (22:06 +0100)
committertobtoht <tob@featherwallet.org>
Tue, 17 Jan 2023 21:06:08 +0000 (22:06 +0100)
src/MainWindow.cpp
src/MainWindow.h

index 65a8d1b8bc600ba4068d690f0d9b2810d151c877..ad3f6e9cff0f1a8fa4ff0ef0702cae5c068641dc 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "config-feather.h"
 #include "constants.h"
-#include "dialog/AccountSwitcherDialog.h"
 #include "dialog/BalanceDialog.h"
 #include "dialog/DebugInfoDialog.h"
 #include "dialog/PasswordDialog.h"
@@ -53,6 +52,7 @@ MainWindow::MainWindow(WindowManager *windowManager, Wallet *wallet, QWidget *pa
 
     m_windowCalc = new CalcWindow(this);
     m_splashDialog = new SplashDialog(this);
+    m_accountSwitcherDialog = new AccountSwitcherDialog(m_ctx, this);
 
     this->restoreGeo();
 
@@ -1030,8 +1030,7 @@ void MainWindow::showWalletCacheDebugDialog() {
 }
 
 void MainWindow::showAccountSwitcherDialog() {
-    AccountSwitcherDialog dialog{m_ctx, this};
-    dialog.exec();
+    m_accountSwitcherDialog->show();
 }
 
 void MainWindow::showAddressChecker() {
index aad3082a42bdcd3a0c77607cc2857d0082209720..5d9fe57cbc22302d0c2a18b21a30b12fb1b7e311 100644 (file)
@@ -14,6 +14,7 @@
 #include "SettingsDialog.h"
 
 #include "dialog/AboutDialog.h"
+#include "dialog/AccountSwitcherDialog.h"
 #include "dialog/SignVerifyDialog.h"
 #include "dialog/VerifyProofDialog.h"
 #include "dialog/SeedDialog.h"
@@ -230,6 +231,7 @@ private:
 
     CalcWindow *m_windowCalc = nullptr;
     SplashDialog *m_splashDialog = nullptr;
+    AccountSwitcherDialog *m_accountSwitcherDialog = nullptr;
 
 #ifdef HAS_XMRIG
     XMRigWidget *m_xmrig = nullptr;