Dialogs are only recreated if their size is LARGER than the current framebuffer

This commit is contained in:
thrust26 2018-12-30 10:29:20 +01:00
parent c1d5020ea0
commit cd8d7498d3
1 changed files with 6 additions and 6 deletions

View File

@ -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<VideoDialog>(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<SnapshotDialog>(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<ConfigPathDialog>(instance(), parent(),
instance().frameBuffer().font(), _boss, w, h);