Menu item not ticked


#1

Hi,

The tick in front of a menu item is not updated.

I am using the following code:

void getCommandInfo(CommandID commandID, ApplicationCommandInfo& result)
{  
 ...snip...
        case NSLCommandIDs::showSystemObjects:
            result.setInfo("Show System Objects", "Show system objects and connections.", viewCategory, 0);
            result.setTicked (Synaptic::showSystemObjects());
            result.addDefaultKeypress('s', 
                                      ModifierKeys::shiftModifier 
                                      | ModifierKeys::ctrlModifier 
                                      | ModifierKeys::commandModifier);
            break;
 ...snip...
}

The value returned by the function Synaptic::showSystemObjects() is toggled when the menu item is selected and returns either 1 or 0 - but whatever is returned, the tick is not displayed.

When using result.setTicked (true) or result.setTicked (false) the tick is shown or hidden - but the dynamic update via the function Synaptic::showSystemObjects() does not work.

I tried to call ApplicationCommandManager::commandStatusChanged() after changing the value returned by Synaptic::showSystemObjects() but this does not help either.

Any idea what I can do to update the tick?

Thanks for any help,

Dietrich