mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
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:
parent
191e69e589
commit
bd44ee5341
6 changed files with 19 additions and 11 deletions
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue