mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 03:40:57 +00:00
The mini-editor cannot be the current editor.
This commit is contained in:
parent
70e76380aa
commit
0bcb44c491
@ -277,6 +277,19 @@ void editors_hide_document(const Document* document)
|
||||
void set_current_editor(Editor* editor)
|
||||
{
|
||||
if (current_editor != editor) {
|
||||
// Here we check if the specified editor in the parameter is the
|
||||
// mini-editor, in this case, we cannot put the mini-editor as the
|
||||
// current one.
|
||||
for (EditorList::iterator it = editors.begin(); it != editors.end(); ++it) {
|
||||
if (it->getEditor() == editor) {
|
||||
if (it->getType() != EditorItem::Normal) {
|
||||
// Avoid setting the mini-editor as the current one
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (current_editor)
|
||||
View::getView(current_editor)->invalidate();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user