From cd8d7498d3f83ac913f16fa6a4f74756cc3e9668 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sun, 30 Dec 2018 10:29:20 +0100 Subject: [PATCH] Dialogs are only recreated if their size is LARGER than the current framebuffer --- src/gui/OptionsDialog.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/OptionsDialog.cxx b/src/gui/OptionsDialog.cxx index b8685fb5f..4648e5e7a 100644 --- a/src/gui/OptionsDialog.cxx +++ b/src/gui/OptionsDialog.cxx @@ -194,8 +194,8 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd, getDynamicBounds(w, h); if(myVideoDialog == nullptr || - uInt32(myVideoDialog->getWidth()) != w || - uInt32(myVideoDialog->getHeight()) != h) + uInt32(myVideoDialog->getWidth()) > w || + uInt32(myVideoDialog->getHeight()) > h) { myVideoDialog = make_unique(instance(), parent(), instance().frameBuffer().font(), w, h); } @@ -223,8 +223,8 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd, getDynamicBounds(w, h); if(mySnapshotDialog == nullptr || - uInt32(mySnapshotDialog->getWidth()) != w || - uInt32(mySnapshotDialog->getHeight()) != h) + uInt32(mySnapshotDialog->getWidth()) > w || + uInt32(mySnapshotDialog->getHeight()) > h) { mySnapshotDialog = make_unique(instance(), parent(), instance().frameBuffer().font(), w, h); } @@ -240,8 +240,8 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd, getDynamicBounds(w, h); if(myConfigPathDialog == nullptr || - uInt32(myConfigPathDialog->getWidth()) != w || - uInt32(myConfigPathDialog->getHeight()) != h) + uInt32(myConfigPathDialog->getWidth()) > w || + uInt32(myConfigPathDialog->getHeight()) > h) { myConfigPathDialog = make_unique(instance(), parent(), instance().frameBuffer().font(), _boss, w, h);