xetra11 Posted July 14, 2016 Share Posted July 14, 2016 The code: http://hastebin.com/fivudaraje.coffeeWhen trying to run this script - the program crashes. When I ommit the inserting to the 9th child element it works fine. That tells me - that adding new subitem only works on the last created child to the root node. Is that expected behavior and I just missed to realise it? But how can I add a subitem to, let say, the 5th root element or the 9th like in the example?Please give me a hint what I'm missing here!greets Charlie! Quote Link to comment Share on other sites More sharing options...
Johxz Posted July 16, 2016 Share Posted July 16, 2016 Hey hi @xetra11 ;) Sorry for the late reply I don't see your postI forgot this issue :shock: or not sure maybe is not an issue :? :? Issue #1248 right now not remember the workaround :( I think from here GUI Editor - Tutorial Advanced you can learn how to use "insertItem". Quote Link to comment Share on other sites More sharing options...
JeffR Posted July 18, 2016 Share Posted July 18, 2016 Can you modify line 4013 in guiTreeViewCtrl.cpp so it looks like: if (parent->mNext && mProfile->mBitmapArrayRects.size() - 1 >= BmpLine) and give it another shot?Looks like when there's a valid item listed in mNext(so we go from a subItem to the next parent's child item) it's not properly vouching that the little line icon exists in the gui profile, so we get a crash.Lemme know if that corrected it for you. Quote Link to comment Share on other sites More sharing options...
JeffR Posted July 18, 2016 Share Posted July 18, 2016 Can you modify line 4013 in guiTreeViewCtrl.cpp so it looks like: if (parent->mNext && mProfile->mBitmapArrayRects.size() - 1 >= BmpLine) Making the whole block look like: // Do we draw the tree lines? if( mFlags.test(ShowTreeLines) ) { drawRect.point.x += ( mTabSize * item->mTabLevel ); Item* parent = item->mParent; for ( S32 i = item->mTabLevel; ( parent && i > 0 ); i-- ) { drawRect.point.x -= mTabSize; if (parent->mNext && mProfile->mBitmapArrayRects.size() - 1 >= BmpLine) drawer->drawBitmapSR( mProfile->mTextureObject, drawRect.point, mProfile->mBitmapArrayRects[bmpLine] ); parent = parent->mParent; } } and give it another shot?Looks like when there's a valid item listed in mNext(so we go from a subItem to the next parent's child item) it's not properly vouching that the little line icon exists in the gui profile, so we get a crash.Lemme know if that corrected it for you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.