Eliminate unnecessary expensive map redraw when opening a map
This commit is contained in:
parent
bc51fcf0be
commit
f6c86e0eed
2 changed files with 7 additions and 1 deletions
|
@ -268,6 +268,7 @@ private:
|
|||
|
||||
bool setMap(QString, bool scrollTreeView = false);
|
||||
void redrawMapScene();
|
||||
void refreshMapScene();
|
||||
bool loadDataStructures();
|
||||
bool loadProjectCombos();
|
||||
bool populateMapList();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue