diff --git a/include/mainwindow.h b/include/mainwindow.h index c575a6ec..1711645e 100644 --- a/include/mainwindow.h +++ b/include/mainwindow.h @@ -268,6 +268,7 @@ private: bool setMap(QString, bool scrollTreeView = false); void redrawMapScene(); + void refreshMapScene(); bool loadDataStructures(); bool loadProjectCombos(); bool populateMapList(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 94d3218b..6a306892 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -439,7 +439,7 @@ bool MainWindow::setMap(QString map_name, bool scrollTreeView) { ui->mapList->setExpanded(mapListProxyModel->mapFromSource(mapListIndexes.value(editor->map->name)), false); } - redrawMapScene(); + refreshMapScene(); displayMapProperties(); if (scrollTreeView) { @@ -469,6 +469,11 @@ void MainWindow::redrawMapScene() if (!editor->displayMap()) return; + this->refreshMapScene(); +} + +void MainWindow::refreshMapScene() +{ on_mainTabBar_tabBarClicked(ui->mainTabBar->currentIndex()); double base = editor->scale_base;