Browse Source

Suppress scene changes while toggling the debug icons visibility during preview camera render so that the attribute editor doesn't constantly refresh, making attributes uneditable. Closes #854.

Lasse Öörni 10 years ago
parent
commit
47fe410d06
1 changed files with 4 additions and 0 deletions
  1. 4 0
      bin/Data/Scripts/Editor/EditorView.as

+ 4 - 0
bin/Data/Scripts/Editor/EditorView.as

@@ -2046,10 +2046,12 @@ void HandleBeginViewUpdate(StringHash eventType, VariantMap& eventData)
     }
     if (eventData["Camera"].GetPtr() is previewCamera.Get())
     {
+        suppressSceneChanges = true;
         if (grid !is null)
             grid.viewMask = 0;
         if (debugIconsNode !is null)
             debugIconsNode.enabled = false;
+        suppressSceneChanges = false;
     }
 }
 
@@ -2063,10 +2065,12 @@ void HandleEndViewUpdate(StringHash eventType, VariantMap& eventData)
     }
     if (eventData["Camera"].GetPtr() is previewCamera.Get())
     {
+        suppressSceneChanges = true;
         if (grid !is null)
             grid.viewMask = 0x80000000;
         if (debugIconsNode !is null)
             debugIconsNode.enabled = true;
+        suppressSceneChanges = false;
     }
 }