summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-06 20:31:00 +0200
committerGitHub <noreply@github.com>2019-07-06 20:31:00 +0200
commit9d6859ca09d887246a7f3e653bed4c4b10fea3a7 (patch)
tree752b1bbac2d98a503a01f701d4eac113d4e1eaa0 /editor
parente7b5f3c4e4deb0445bae0ae336c152621f842ead (diff)
parente222615e979a494d5cdb69958d1690e8ac745728 (diff)
Merge pull request #30379 from bojidar-bg/30368-editor-stay-dimmed
Fix editor remaining dimmed after certain actions
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 9d3be1ab9e..1e9cb2f88d 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -4967,18 +4967,18 @@ void EditorNode::dim_editor(bool p_dimming) {
static int dim_count = 0;
bool dim_ui = EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup");
if (p_dimming) {
- if (dim_ui) {
- if (dim_count == 0) {
- _start_dimming(true);
- }
- dim_count++;
+ if (dim_ui && dim_count == 0) {
+ _start_dimming(true);
}
+ dim_count++;
} else {
if (dim_count == 1) {
_start_dimming(false);
- dim_count = 0;
- } else if (dim_ui && dim_count > 0) {
+ }
+ if (dim_count > 0) {
dim_count--;
+ } else {
+ ERR_PRINT("Undimmed before dimming!");
}
}
}