File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
NodeGraphQt/custom_widgets/properties_bin Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -798,15 +798,17 @@ def add_node(self, node):
798798 if self .limit () == 0 or self ._lock :
799799 return
800800
801- rows = self ._prop_list .rowCount () - 1
802- if rows >= self .limit ():
803- self ._prop_list .removeRow (rows - 1 )
804-
801+ # remove pre-existing instance
805802 itm_find = self ._prop_list .findItems (node .id , QtCore .Qt .MatchExactly )
806803 if itm_find :
807804 self ._prop_list .removeRow (itm_find [0 ].row ())
808805
809806 self ._prop_list .insertRow (0 )
807+ rows = self ._prop_list .rowCount () - 1
808+
809+ if rows >= (self .limit ()):
810+ # remove last row
811+ self ._prop_list .removeRow (rows )
810812
811813 prop_widget = self .create_property_editor (node = node )
812814 prop_widget .property_closed .connect (self .__on_prop_close )
You can’t perform that action at this time.
0 commit comments