equal
deleted
inserted
replaced
157 Set default block parameters |
157 Set default block parameters |
158 @param values: Block parameters values |
158 @param values: Block parameters values |
159 """ |
159 """ |
160 # Extract block type defined in parameters |
160 # Extract block type defined in parameters |
161 blocktype = values.get("type", None) |
161 blocktype = values.get("type", None) |
|
162 |
|
163 # Select block type in library panel |
|
164 if blocktype is not None: |
|
165 self.LibraryPanel.SelectTreeItem(blocktype, |
|
166 values.get("inputs", None)) |
162 |
167 |
163 # Define regular expression for determine if block name is block |
168 # Define regular expression for determine if block name is block |
164 # default name |
169 # default name |
165 default_name_model = GetBlockTypeDefaultNameModel(blocktype) |
170 default_name_model = GetBlockTypeDefaultNameModel(blocktype) |
166 |
171 |
183 # Set value of other controls |
188 # Set value of other controls |
184 else: |
189 else: |
185 control = self.ParamsControl.get(name, None) |
190 control = self.ParamsControl.get(name, None) |
186 if control is not None: |
191 if control is not None: |
187 control.SetValue(value) |
192 control.SetValue(value) |
188 |
|
189 # Select block type in library panel |
|
190 if blocktype is not None: |
|
191 self.LibraryPanel.SelectTreeItem(blocktype, |
|
192 values.get("inputs", None)) |
|
193 |
193 |
194 # Refresh preview panel |
194 # Refresh preview panel |
195 self.RefreshPreview() |
195 self.RefreshPreview() |
196 |
196 |
197 def GetValues(self): |
197 def GetValues(self): |