mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-21 17:45:44 -05:00
Fix window focus when closing Palette Editor
This commit is contained in:
parent
3ae1e404f8
commit
e2b1a1ecbb
|
|
@ -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<QWidget*>(parent());
|
||||
if (p && p->isVisible()) {
|
||||
p->raise();
|
||||
p->activateWindow();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user