File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
blacs/plugins/virtual_device Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -290,10 +290,20 @@ def on_treeView_connection_table_clicked(self, index):
290290 complete_vds .append (vd .text ())
291291
292292 for r in range (0 , vd .rowCount ()):
293- if vd .child (r , self .VD_TREE_COL_NAME ).text () != item .parent ().text ():
293+ output_group = vd .child (r , self .VD_TREE_COL_NAME )
294+ if output_group .text () != item .parent ().text ():
294295 continue
295296
296- vd .child (r , self .VD_TREE_COL_NAME ).appendRow (self .make_virtual_device_output_row (new_vd_output ))
297+ # Avoid duplicating outputs in a virtual device
298+ already_present = False
299+ for j in range (0 , output_group .rowCount ()):
300+ if output_group .child (j ).text () == new_vd_output .text ():
301+ already_present = True
302+ break
303+ if already_present :
304+ continue
305+
306+ output_group .appendRow (self .make_virtual_device_output_row (new_vd_output ))
297307
298308 def on_virtual_devices_item_changed (self , item ):
299309 if item .column () != self .VD_TREE_COL_NAME or not item .data (self .VD_TREE_ROLE_IS_DUMMY_ROW ):
You can’t perform that action at this time.
0 commit comments