Adding a button at a specific position did not work since converting LaunchBox
to using layout management. When storing the settings, the new button was stored last. Using the BLayoutItem at the given index retrieves the correct button. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37077 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5d6d1935d6
commit
70e39d0927
@ -297,7 +297,10 @@ PadView::RemoveButton(LaunchButton* button)
|
||||
LaunchButton*
|
||||
PadView::ButtonAt(int32 index) const
|
||||
{
|
||||
return dynamic_cast<LaunchButton*>(ChildAt(index));
|
||||
BLayoutItem* item = fButtonLayout->ItemAt(index);
|
||||
if (item == NULL)
|
||||
return NULL;
|
||||
return dynamic_cast<LaunchButton*>(item->View());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user