[EGD-4267] Don't clean application windows if the application switch is not yet confirmed. (#1040)

This commit is contained in:
Piotr Tanski
2020-11-19 09:21:54 +01:00
committed by GitHub
parent 47740cabfd
commit 0a0366bb74
2 changed files with 2 additions and 9 deletions

View File

@@ -178,10 +178,7 @@ namespace app
void Application::returnToPreviousWindow(const uint32_t times)
{
auto prevWindow = getPrevWindow(times);
if (prevWindow == gui::name::window::no_window) {
LOG_INFO("Back to previous application");
cleanPrevWindw();
if (const auto prevWindow = getPrevWindow(times); prevWindow == gui::name::window::no_window) {
app::manager::Controller::switchBack(this);
}
else {
@@ -676,11 +673,6 @@ namespace app
return *std::prev(windowsStack.stack.end(), count + 1);
}
void Application::Application::cleanPrevWindw()
{
this->windowsStack.stack.clear();
}
gui::AppWindow *Application::getCurrentWindow()
{
if (windowsStack.stack.size() == 0) {