Merge pull request #30379 from bojidar-bg/30368-editor-stay-dimmed
Fix editor remaining dimmed after certain actions
This commit is contained in:
commit
9d6859ca09
2 changed files with 15 additions and 7 deletions
|
@ -4967,18 +4967,18 @@ void EditorNode::dim_editor(bool p_dimming) {
|
||||||
static int dim_count = 0;
|
static int dim_count = 0;
|
||||||
bool dim_ui = EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup");
|
bool dim_ui = EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup");
|
||||||
if (p_dimming) {
|
if (p_dimming) {
|
||||||
if (dim_ui) {
|
if (dim_ui && dim_count == 0) {
|
||||||
if (dim_count == 0) {
|
|
||||||
_start_dimming(true);
|
_start_dimming(true);
|
||||||
}
|
}
|
||||||
dim_count++;
|
dim_count++;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (dim_count == 1) {
|
if (dim_count == 1) {
|
||||||
_start_dimming(false);
|
_start_dimming(false);
|
||||||
dim_count = 0;
|
}
|
||||||
} else if (dim_ui && dim_count > 0) {
|
if (dim_count > 0) {
|
||||||
dim_count--;
|
dim_count--;
|
||||||
|
} else {
|
||||||
|
ERR_PRINT("Undimmed before dimming!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,14 @@ void Popup::_notification(int p_what) {
|
||||||
update_configuration_warning();
|
update_configuration_warning();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p_what == NOTIFICATION_EXIT_TREE) {
|
||||||
|
if (popped_up) {
|
||||||
|
popped_up = false;
|
||||||
|
notification(NOTIFICATION_POPUP_HIDE);
|
||||||
|
emit_signal("popup_hide");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_ENTER_TREE) {
|
if (p_what == NOTIFICATION_ENTER_TREE) {
|
||||||
//small helper to make editing of these easier in editor
|
//small helper to make editing of these easier in editor
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
|
|
Loading…
Reference in a new issue