misc cleanups related to ranges

gui padding is a >=0 element
guitabbookctrl.selectedPage defaults to -1
shape editor triggers derived from textrows must ensure they are actually loking aty an entry. -1 is the return value of" not found"
This commit is contained in:
AzaezelX 2025-10-07 16:31:24 -05:00
parent 191e69e589
commit bd44ee5341
6 changed files with 19 additions and 11 deletions

View file

@ -2116,8 +2116,12 @@ function ShapeEdTriggerList::removeItem( %this, %frame, %state )
%row = %this.findTextIndex( %this.getTriggerText( %frame, %state ) );
if ( %row > 0 )
{
eval( "ShapeEdAnimWindow-->trigger" @ %this.getRowId( %row ) @ ".delete();" );
%this.removeRow( %row );
%id = %this.getRowId( %row );
if (%id>=0)
{
eval( "ShapeEdAnimWindow-->trigger" @ %id @ ".delete();");
%this.removeRow( %row );
}
}
}
@ -2126,8 +2130,12 @@ function ShapeEdTriggerList::removeAll( %this )
%count = %this.rowCount();
for ( %row = %count-1; %row > 0; %row-- )
{
eval( "ShapeEdAnimWindow-->trigger" @ %this.getRowId( %row ) @ ".delete();" );
%this.removeRow( %row );
%id = %this.getRowId( %row );
if (%id>=0)
{
eval( "ShapeEdAnimWindow-->trigger" @ %id @ ".delete();");
%this.removeRow( %row );
}
}
}