Commit af58f5b 1 parent f0d0479 commit af58f5b Copy full SHA for af58f5b
File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,24 @@ void WalletFrame::setCurrentWallet(WalletModel* wallet_model)
106
106
{
107
107
if (mapWalletViews.count (wallet_model) == 0 ) return ;
108
108
109
+ // Stop the effect of hidden widgets on the size hint of the shown one in QStackedWidget.
110
+ WalletView* view_about_to_hide = currentWalletView ();
111
+ if (view_about_to_hide) {
112
+ QSizePolicy sp = view_about_to_hide->sizePolicy ();
113
+ sp.setHorizontalPolicy (QSizePolicy::Ignored);
114
+ view_about_to_hide->setSizePolicy (sp);
115
+ }
116
+
109
117
WalletView *walletView = mapWalletViews.value (wallet_model);
110
- walletStack->setCurrentWidget (walletView);
111
118
assert (walletView);
119
+
120
+ // Set or restore the default QSizePolicy which could be set to QSizePolicy::Ignored previously.
121
+ QSizePolicy sp = walletView->sizePolicy ();
122
+ sp.setHorizontalPolicy (QSizePolicy::Preferred);
123
+ walletView->setSizePolicy (sp);
124
+ walletView->updateGeometry ();
125
+
126
+ walletStack->setCurrentWidget (walletView);
112
127
walletView->updateEncryptionStatus ();
113
128
}
114
129
You can’t perform that action at this time.
0 commit comments