mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 21:41:02 +00:00
Fix problem closing the last "normal" editor (because the existence of the new "mini" editor).
This commit is contained in:
parent
5be14417f3
commit
b06c6719c8
@ -428,8 +428,13 @@ void close_editor(Editor* editor)
|
||||
JWidget parent_box = view->getParent(); // Box or panel
|
||||
JWidget other_widget;
|
||||
|
||||
// You can't remove all editors.
|
||||
if (editors.size() == 1)
|
||||
// You can't remove all (normal) editors.
|
||||
int normalEditors = 0;
|
||||
for (EditorList::iterator it = editors.begin(); it != editors.end(); ++it) {
|
||||
if (it->getType() == EditorItem::Normal)
|
||||
normalEditors++;
|
||||
}
|
||||
if (normalEditors == 1) // In this case we avoid to remove the last normal editor
|
||||
return;
|
||||
|
||||
// Deselect the editor.
|
||||
|
Loading…
x
Reference in New Issue
Block a user