From 6484947485f4d57bfd170437ec4a696e06e01f89 Mon Sep 17 00:00:00 2001 From: f321x Date: Wed, 29 Oct 2025 10:50:56 +0100 Subject: [PATCH] qt: allow opening BalanceDialog if warning Allow to open the BalanceDialog, by clicking on the Pie Diagram in the bottom left corner of the main window, if there is an active warning, even if the wallets balance is 0. Right now the user can see the warning icon for the lighting channel reserve, but cannot click on the icon to read the actual warning if there is no balance in the wallet. --- electrum/gui/qt/balance_dialog.py | 4 ++++ electrum/gui/qt/main_window.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/balance_dialog.py b/electrum/gui/qt/balance_dialog.py index f3aa118f4..e2b18fcc4 100644 --- a/electrum/gui/qt/balance_dialog.py +++ b/electrum/gui/qt/balance_dialog.py @@ -105,6 +105,10 @@ class BalanceToolButton(QToolButton, PieChartObject): self._update_size() self._warning = False + @property + def has_warning(self) -> bool: + return bool(self._warning) + def update_list(self, l, warning: bool): self._warning = warning self._list = l diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index ab6994913..add360113 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -1804,7 +1804,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): def show_balance_dialog(self): balance = self.wallet.get_balances_for_piechart().total() - if balance == 0: + if balance == 0 and not self.balance_label.has_warning: return from .balance_dialog import BalanceDialog d = BalanceDialog(self, wallet=self.wallet)