New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GuiTreeViewCtrl::getParentItem incorrent use in ShapeEditor script files. #1246

Merged
merged 1 commit into from Mar 9, 2015

Conversation

Projects
None yet
3 participants
@LuisAntonRebollo
Contributor

LuisAntonRebollo commented Mar 8, 2015

Related to Object editor lod alteration fails #1135

If you check script files, use %this.getParent( %id ); but are a invalid method:

DefineEngineMethod( GuiControl, getParent, GuiControl*, (),,
   "Get the immediate parent control of the control.\n"
   "@return The immediate parent GuiControl or 0 if the control is not parented to a GuiControl.\n" )
{
   return object->getParent();
}

Looks like the correct method is:

//FIXME: [rene 11/09/09 - This clashes with GuiControl.getParent(); bad thing; should be getParentItem]
DefineEngineMethod( GuiTreeViewCtrl, getParentItem, S32, (S32 itemId), ,
   "Get the parent of a given id in the tree.\n\n"
   "@param itemId TreeItemID of item that has a parent we should get.\n"
   "@return Id of parent of given item.")
{      
   return(object->getParentItem(itemId));
}
@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 8, 2015

Contributor

Awesome work, thanks @LuisAntonRebollo! Will test tonight.

Contributor

crabmusket commented Mar 8, 2015

Awesome work, thanks @LuisAntonRebollo! Will test tonight.

@Azaezel

This comment has been minimized.

Show comment
Hide comment
@Azaezel

Azaezel Mar 8, 2015

Contributor

verified. both lod and crash errors fixed.

Contributor

Azaezel commented Mar 8, 2015

verified. both lod and crash errors fixed.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 8, 2015

Contributor

😀

Contributor

crabmusket commented Mar 8, 2015

😀

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 9, 2015

Contributor

Or, you know, I'll check it now.

Contributor

crabmusket commented Mar 9, 2015

Or, you know, I'll check it now.

crabmusket added a commit that referenced this pull request Mar 9, 2015

Merge pull request #1246 from BeamNG/fix_obj_editor_lod
Fix GuiTreeViewCtrl::getParentItem incorrent use in ShapeEditor script files.

@crabmusket crabmusket merged commit 67e9119 into GarageGames:development Mar 9, 2015

1 check passed

default Merged build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment