diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a99cc76..80590e4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d - Fixed a bug where saving the tileset editor would reselect the main editor's first selected metatile. - Fix crashes / unexpected behavior if certain scripting API functions are given invalid palette or tile numbers. - Silence unnecessary error logging when parsing C defines Porymap doesn't use. +- Fix some windows like the Tileset Editor not raising to the front when reactivated. ## [4.5.0] - 2021-12-26 ### Added diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ea9bade6..a5e14b06 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1802,12 +1802,14 @@ void MainWindow::on_actionEdit_Shortcuts_triggered() if (!shortcutsEditor) initShortcutsEditor(); - if (shortcutsEditor->isHidden()) + if (shortcutsEditor->isHidden()) { shortcutsEditor->show(); - else if (shortcutsEditor->isMinimized()) + } else if (shortcutsEditor->isMinimized()) { shortcutsEditor->showNormal(); - else + } else { + shortcutsEditor->raise(); shortcutsEditor->activateWindow(); + } } void MainWindow::initShortcutsEditor() { @@ -3028,6 +3030,7 @@ void MainWindow::on_actionTileset_Editor_triggered() } else if (this->tilesetEditor->isMinimized()) { this->tilesetEditor->showNormal(); } else { + this->tilesetEditor->raise(); this->tilesetEditor->activateWindow(); } @@ -3087,6 +3090,7 @@ void MainWindow::on_actionEdit_Preferences_triggered() { } else if (preferenceEditor->isMinimized()) { preferenceEditor->showNormal(); } else { + preferenceEditor->raise(); preferenceEditor->activateWindow(); } } @@ -3175,6 +3179,7 @@ void MainWindow::on_actionRegion_Map_Editor_triggered() { } else if (this->regionMapEditor->isMinimized()) { this->regionMapEditor->showNormal(); } else { + this->regionMapEditor->raise(); this->regionMapEditor->activateWindow(); } } diff --git a/src/ui/tileseteditor.cpp b/src/ui/tileseteditor.cpp index 0f4611c5..64a88cac 100644 --- a/src/ui/tileseteditor.cpp +++ b/src/ui/tileseteditor.cpp @@ -792,6 +792,7 @@ void TilesetEditor::on_actionChange_Palettes_triggered() } else if (this->paletteEditor->isMinimized()) { this->paletteEditor->showNormal(); } else { + this->paletteEditor->raise(); this->paletteEditor->activateWindow(); } }