From 5a8e78308a00c6f8479cf10a091af0ffb5a946bd Mon Sep 17 00:00:00 2001 From: Marukyu Date: Fri, 23 Sep 2016 10:19:52 +0200 Subject: [PATCH] Fixed "New Dungeon" button not creating and switching to empty level --- src/Client/System/NEWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Client/System/NEWindow.cpp b/src/Client/System/NEWindow.cpp index dd303d0..3276df8 100644 --- a/src/Client/System/NEWindow.cpp +++ b/src/Client/System/NEWindow.cpp @@ -457,6 +457,10 @@ void NEWindow::onProcessWindow(const gui2::WidgetEvents& events) { dungeon->removeLevel(dungeon->getLevelCount() - 1); } + dungeon->insertLevel(0); + levelPanel->setSelectedLevel(0); + switchToLevel(&dungeon->getLevel(0)); + levelPanel->updateDungeon(); } if (closeConfirmMessage->wasClosed() && closeConfirmMessage->getClickedButton() == 0)