Fixed bug when editing block information of an extended standard function
authorLaurent Bessard
Wed, 25 Sep 2013 10:47:46 +0200
changeset 1327 632780979432
parent 1326 e2c11668addf
child 1328 a2f2981df9b0
Fixed bug when editing block information of an extended standard function
dialogs/FBDBlockDialog.py
--- a/dialogs/FBDBlockDialog.py	Tue Sep 24 14:45:30 2013 +0200
+++ b/dialogs/FBDBlockDialog.py	Wed Sep 25 10:47:46 2013 +0200
@@ -160,6 +160,11 @@
         # Extract block type defined in parameters
         blocktype = values.get("type", None)
         
+        # Select block type in library panel    
+        if blocktype is not None:
+            self.LibraryPanel.SelectTreeItem(blocktype, 
+                                             values.get("inputs", None))
+        
         # Define regular expression for determine if block name is block
         # default name
         default_name_model = GetBlockTypeDefaultNameModel(blocktype)
@@ -186,11 +191,6 @@
                 if control is not None:
                     control.SetValue(value)
         
-        # Select block type in library panel    
-        if blocktype is not None:
-            self.LibraryPanel.SelectTreeItem(blocktype, 
-                                             values.get("inputs", None))
-        
         # Refresh preview panel
         self.RefreshPreview()