332_2_uppsrc.diff
uppsrc/CtrlLib/MenuBar.cpp 2012-09-30 09:54:17 +0400 | ||
---|---|---|
558 | 558 |
{ |
559 | 559 |
static Vector<Ctrl *> ows; // Used to prevent another open local menu for single owner to be opened (repeated right-click) |
560 | 560 |
int level = ows.GetCount(); |
561 |
if(IsEmpty() || FindIndex(ows, owner) >= 0)
|
|
561 |
if(IsEmpty()) |
|
562 | 562 |
return; |
563 |
ows.Add(owner); |
|
563 |
int index = FindIndex(ows, owner); |
|
564 |
if(index >= 0) |
|
565 |
CloseMenu(); |
|
566 |
else |
|
567 |
ows.Add(owner); |
|
564 | 568 |
PopUp(owner, p); |
565 | 569 |
EventLoop(this); |
570 |
LLOG("MenuBar::Execute level before: " << level); |
|
571 |
if(index >= 0) |
|
572 |
return; |
|
573 |
LLOG("MenuBar::Execute level after: " << level); |
|
566 | 574 |
CloseMenu(); |
567 | 575 |
ows.SetCount(level); |
568 | 576 |
} |