diff options
Diffstat (limited to 'gui/GuiManager.cpp')
-rw-r--r-- | gui/GuiManager.cpp | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp index 396491fc80..6fa34aa04a 100644 --- a/gui/GuiManager.cpp +++ b/gui/GuiManager.cpp @@ -139,29 +139,20 @@ void GuiManager::redraw() { if (_dialogStack.empty()) return; - switch (_redrawStatus) { - case kRedrawCloseDialog: - case kRedrawFull: - case kRedrawTopDialog: - _theme->clearAll(); - _theme->openDialog(true); - - for (i = 0; i < _dialogStack.size() - 1; i++) { - _dialogStack[i]->drawDialog(); - } + if (_dialogStack.size() > 1) { + _theme->clearAll(); + _theme->openDialog(true); - _theme->finishBuffering(); - _theme->updateScreen(); + for (i = 0; i < _dialogStack.size() - 1; i++) + _dialogStack[i]->drawDialog(); - case kRedrawOpenDialog: - _theme->openDialog(true, (ThemeEngine::ShadingStyle)xmlEval()->getVar("Dialog." + _dialogStack.top()->_name + ".Shading", 0)); - _dialogStack.top()->drawDialog(); - _theme->finishBuffering(); - break; + _theme->finishBuffering(); + _theme->updateScreen(); + } - default: - return; - } + _theme->openDialog(true, (ThemeEngine::ShadingStyle)xmlEval()->getVar("Dialog." + _dialogStack.top()->_name + ".Shading", 0)); + _dialogStack.top()->drawDialog(); + _theme->finishBuffering(); _theme->updateScreen(); _redrawStatus = kRedrawDisabled; @@ -247,8 +238,6 @@ void GuiManager::runLoop() { if (_useStdCursor) setupCursor(); -// _theme->refresh(); - _themeChange = false; _redrawStatus = kRedrawFull; redraw(); @@ -347,8 +336,7 @@ void GuiManager::restoreState() { void GuiManager::openDialog(Dialog *dialog) { _dialogStack.push(dialog); - if (_redrawStatus != kRedrawFull) - _redrawStatus = kRedrawOpenDialog; + _redrawStatus = kRedrawFull; // We reflow the dialog just before opening it. If the screen changed // since the last time we looked, also refresh the loaded theme, @@ -364,8 +352,7 @@ void GuiManager::closeTopDialog() { // Remove the dialog from the stack _dialogStack.pop(); - if (_redrawStatus != kRedrawFull) - _redrawStatus = kRedrawCloseDialog; + _redrawStatus = kRedrawFull; } void GuiManager::setupCursor() { |