diff options
author | Andreas Haas <liu.gam3@gmail.com> | 2017-08-15 20:57:05 +0200 |
---|---|---|
committer | Andreas Haas <liu.gam3@gmail.com> | 2017-08-15 20:57:30 +0200 |
commit | aaedde41228d0afab0ac994032ceb5eb25c13871 (patch) | |
tree | 7b44a09d9c74bc1dacb1ffcea16d6a28c530761d | |
parent | cb0e357d0b8565fcba6f2cf0ec5ea8e795e3fc2a (diff) |
Fix Editor dimming.
Fixes #10353
-rw-r--r-- | editor/editor_node.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b2e21fa168..2dca98d027 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4907,13 +4907,19 @@ void EditorNode::dim_editor(bool p_dimming) { static int dim_count = 0; bool dim_ui = EditorSettings::get_singleton()->get("interface/dim_editor_on_dialog_popup"); if (p_dimming) { - if (dim_ui && dim_count == 0) - _start_dimming(true); - dim_count++; + if (dim_ui) { + if (dim_count == 0) { + _start_dimming(true); + } + dim_count++; + } } else { - dim_count--; - if (dim_count < 1) + if (dim_count == 1) { _start_dimming(false); + dim_count = 0; + } else if (dim_ui && dim_count > 0) { + dim_count--; + } } } |