Reworked BMenu::Set/IsEnabled(). I tested what happens under beos and our code seems to be finally correct
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15999 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4ea667a0b0
commit
c592b98fd2
@ -532,11 +532,9 @@ BMenu::SetEnabled(bool enabled)
|
||||
return;
|
||||
|
||||
fEnabled = enabled;
|
||||
for (int32 i = 0; i < CountItems(); i++)
|
||||
ItemAt(i)->SetEnabled(enabled);
|
||||
|
||||
if (fSuper)
|
||||
fSuper->SetEnabled(enabled);
|
||||
if (fSuperitem)
|
||||
fSuperitem->SetEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
@ -582,7 +580,10 @@ BMenu::IsLabelFromMarked()
|
||||
bool
|
||||
BMenu::IsEnabled() const
|
||||
{
|
||||
return fEnabled;
|
||||
if (!fEnabled)
|
||||
return false;
|
||||
|
||||
return fSuper ? fSuper->IsEnabled() : true ;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user