made BrowserDialog comparing parents instead of parent's sizes (fixes #836)

This commit is contained in:
Thomas Jentzsch 2021-10-27 19:39:45 +02:00
parent 7ab27618a7
commit 81832e80f1
1 changed files with 1 additions and 2 deletions

View File

@ -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<BrowserDialog>(parent, font, w, h);
ourBrowser->setTitle(title); // has to be always updated!