Commit 1e31eca 1 parent f0d0479 commit 1e31eca Copy full SHA for 1e31eca
File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,23 @@ 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
+ if (WalletView* view_about_to_hide = currentWalletView (); view_about_to_hide != nullptr ) {
111
+ QSizePolicy sp = view_about_to_hide->sizePolicy ();
112
+ sp.setHorizontalPolicy (QSizePolicy::Ignored);
113
+ view_about_to_hide->setSizePolicy (sp);
114
+ }
115
+
109
116
WalletView *walletView = mapWalletViews.value (wallet_model);
110
- walletStack->setCurrentWidget (walletView);
111
117
assert (walletView);
118
+
119
+ // Set or restore the default QSizePolicy which could be set to QSizePolicy::Ignored previously.
120
+ QSizePolicy sp = walletView->sizePolicy ();
121
+ sp.setHorizontalPolicy (QSizePolicy::Preferred);
122
+ walletView->setSizePolicy (sp);
123
+ walletView->updateGeometry ();
124
+
125
+ walletStack->setCurrentWidget (walletView);
112
126
walletView->updateEncryptionStatus ();
113
127
}
114
128
You can’t perform that action at this time.
0 commit comments