- assigned_to: nobody --> smithc
I looked up the file extbutton.itk in my ActiveTcl
package.
In iwidgets::Extbutton::state function
implementation, if state is set to 'disabled', it
will save the current configurations of foreground
and cursor to _oldValues(-fg) and _oldValues(-
cursor); if state is set to 'normal', it will set the
foreground and cursor back by reading the _oldValues.
It works fine as long as the extbutton change the
state between 'disabled' and 'normal' back and force.
But if you set the state to 'disabled' consecutively,
for example, twice, the values stored in _oldValues
will be replaced by the disabled configuration. When
you set the state to 'normal' after that, you will
not get the correct 'normal' settings.
The fix might be comparing the button's current state
with the state it tries to set. If they are the same,
we can break out of this function.
Regards,
Chengyi
Log in to post a comment.