I can’t get the following code to work as I would like, i.e, toggle the button image. I’m calling it from my ApplicationCommandTarget::perform(const InvocationInfo& info)
In my perform method I use info.originatingComponent to get a pointer to the button that was pressed. I check to make sure it is the right button and I try to set it’s toggle state but it isn’t working. I think it does change states but changes straight back immediately? If I run in debug mode however perform is only called once per button press. If I try the above code from another button function it swaps images no problem. Any ideas? I’m still trying to get my head around the ApplicationCommandTarget, it’s getting clearer but I’m sure I’ve missed something along the way.