diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/buy.cpp | 2 | ||||
-rw-r--r-- | src/gui/sell.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index b4f8ca5e..a2398472 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -268,7 +268,7 @@ void BuyDialog::logic() { Window::logic(); - if (!current_npc && isVisible()) setVisible(false); + if (!current_npc) setVisible(false); } void BuyDialog::setVisible(bool visible) diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index 1194222b..d434408b 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -286,7 +286,7 @@ void SellDialog::logic() { Window::logic(); - if (!current_npc && isVisible()) setVisible(false); + if (!current_npc) setVisible(false); } void SellDialog::setVisible(bool visible) diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index e36aea97..8d7b442b 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -314,6 +314,9 @@ void Window::setVisible(bool visible) void Window::setVisible(bool visible, bool forceSticky) { + if (visible == isVisible()) + return; // Nothing to do + // Check if the window is off screen... if (visible) checkIfIsOffScreen(); |