From 81832e80f19b6874bc35aac5c18caacb7200ebcc Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Wed, 27 Oct 2021 19:39:45 +0200 Subject: [PATCH] made BrowserDialog comparing parents instead of parent's sizes (fixes #836) --- src/gui/BrowserDialog.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/BrowserDialog.cxx b/src/gui/BrowserDialog.cxx index a60c4cb55..a4670b993 100644 --- a/src/gui/BrowserDialog.cxx +++ b/src/gui/BrowserDialog.cxx @@ -128,8 +128,7 @@ void BrowserDialog::show(GuiObject* parent, const GUI::Font& font, if(w > uInt32(font.getMaxCharWidth() * 80)) w = font.getMaxCharWidth() * 80; - if(ourBrowser == nullptr - || ourBrowser->getWidth() != int(w) || ourBrowser->getHeight() != int(h)) + if(ourBrowser == nullptr || &ourBrowser->parent() != &parent->parent()) ourBrowser = make_unique(parent, font, w, h); ourBrowser->setTitle(title); // has to be always updated!