From e2b1a1ecbb3b8fcfb34aedfe7a3f1c1d53d7791f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 8 Aug 2025 15:24:46 -0400 Subject: [PATCH] Fix window focus when closing Palette Editor --- src/ui/paletteeditor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ui/paletteeditor.cpp b/src/ui/paletteeditor.cpp index a862302e..ebc66cde 100644 --- a/src/ui/paletteeditor.cpp +++ b/src/ui/paletteeditor.cpp @@ -283,4 +283,13 @@ void PaletteEditor::closeEvent(QCloseEvent*) { saveGeometry(), saveState() ); + + // Opening the color search window then closing the Palette Editor sets + // focus to the main editor window instead of the parent (Tileset Editor). + // Make sure the parent is active when we close. + auto p = dynamic_cast(parent()); + if (p && p->isVisible()) { + p->raise(); + p->activateWindow(); + } }