Browse Source

Use a reference to UpdateAttributes() fullupdate flag, so that if a non-fullupdate turns into a fullupdate due to changed number of attribute editors, the iconpanel is resized properly.

Lasse Öörni 12 years ago
parent
commit
cb5961c04d

+ 1 - 1
Bin/Data/Scripts/Editor/AttributeEditor.as

@@ -706,7 +706,7 @@ void GetEditorValue(UIElement@ parent, VariantType type, Array<String>@ enumName
     }
 }
 
-void UpdateAttributes(Array<Serializable@>@ serializables, ListView@ list, bool fullUpdate)
+void UpdateAttributes(Array<Serializable@>@ serializables, ListView@ list, bool& fullUpdate)
 {
     // If attributes have changed structurally, do a full update
     uint count = GetAttributeEditorCount(serializables);

+ 3 - 2
Bin/Data/Scripts/Editor/EditorInspectorWindow.as

@@ -176,7 +176,7 @@ void UpdateAttributeInspector(bool fullUpdate = true)
     if (fullUpdate)
         attributesFullDirty = false;
 
-    // If full update delete all containers and added them back as necessary
+    // If full update delete all containers and add them back as necessary
     if (fullUpdate)
         DeleteAllContainers();
 
@@ -308,7 +308,8 @@ void UpdateAttributeInspector(bool fullUpdate = true)
 
 void UpdateNodeAttributes()
 {
-    UpdateAttributes(ToSerializableArray(editNodes), GetNodeContainer().GetChild("AttributeList"), false);
+    bool fullUpdate = false;
+    UpdateAttributes(ToSerializableArray(editNodes), GetNodeContainer().GetChild("AttributeList"), fullUpdate);
 }
 
 void UpdateAttributeInspectorIcons()