@@ -673,13 +673,13 @@ def sliderTreeDelete(self):
673673 idxs = self .uiSliderTREE .getSelectedIndexes ()
674674 roots = coerceIndexToRoots (idxs )
675675 if not roots :
676- QMessageBox .warning (self , "Warning" , "Nothing Selected" )
676+ QMessageBox .warning (self , "Warning" , "Nothing Selected in Slider tree " )
677677 return
678678 roots = makeUnique ([i .model ().itemFromIndex (i ) for i in roots ])
679679 for r in roots :
680680 if isinstance (r , Simplex ):
681681 QMessageBox .warning (
682- self , "Warning" , "Cannot delete a simplex system this way (for now) "
682+ self , "Warning" , "Cannot delete a simplex system this way"
683683 )
684684 return
685685
@@ -692,7 +692,17 @@ def comboTreeDelete(self):
692692 """Delete some objects in the Combo tree"""
693693 idxs = self .uiComboTREE .getSelectedIndexes ()
694694 roots = coerceIndexToRoots (idxs )
695+ if not roots :
696+ QMessageBox .warning (self , "Warning" , "Nothing Selected in Combo tree" )
697+ return
695698 roots = makeUnique ([i .model ().itemFromIndex (i ) for i in roots ])
699+ for r in roots :
700+ if isinstance (r , Simplex ):
701+ QMessageBox .warning (
702+ self , "Warning" , "Cannot delete a simplex system this way"
703+ )
704+ return
705+
696706 for r in roots :
697707 r .delete ()
698708 self .uiComboTREE .model ().invalidateFilter ()
0 commit comments