Browse Source

Ensure material is selected on first opening of material manager

Jaime van Kessel 5 years ago
parent
commit
e805c3db05
1 changed files with 5 additions and 1 deletions
  1. 5 1
      resources/qml/Preferences/Materials/MaterialsPage.qml

+ 5 - 1
resources/qml/Preferences/Materials/MaterialsPage.qml

@@ -53,7 +53,11 @@ Item
     }
 
     // When loaded, try to select the active material in the tree
-    Component.onCompleted: resetExpandedActiveMaterial()
+    Component.onCompleted:
+    {
+        resetExpandedActiveMaterial()
+        base.newRootMaterialIdToSwitchTo = active_root_material_id
+    }
 
     // Every time the selected item has changed, notify to the details panel
     onCurrentItemChanged: