|
|
|
@ -27,6 +27,18 @@ |
|
|
|
#include <tool/action_menu.h>
|
|
|
|
|
|
|
|
|
|
|
|
CONDITIONAL_MENU::CONDITIONAL_MENU( bool isContextMenu, TOOL_INTERACTIVE* aTool ) : |
|
|
|
m_isContextMenu( isContextMenu ) |
|
|
|
{ |
|
|
|
m_tool = aTool; |
|
|
|
|
|
|
|
// wxWidgets 3.0.4 on MSW checks for an empty menu before running the MENU_OPEN
|
|
|
|
// event. Add a dummy item to ensure that the event is dispatched. Evaluate()
|
|
|
|
// will clear the menu before evaluating all the items anyway.
|
|
|
|
Append( wxID_ANY, wxT( "dummy menu for MSW" ) ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ACTION_MENU* CONDITIONAL_MENU::create() const |
|
|
|
{ |
|
|
|
CONDITIONAL_MENU* clone = new CONDITIONAL_MENU( m_isContextMenu, m_tool ); |
|
|
|
|