eirikbakke opened a new pull request #2979:
URL: https://github.com/apache/netbeans/pull/2979


   Fix incorrect checkbox state shown by 'Show Editor Toolbar' and other 
boolean editor preference actions.
   
   To reproduce:
   1) Open a file for editing in the NetBeans editor.
   2) Click View->"Show Only Editor"
   3) Click View->"Show Editor Toolbar"
   4) Click View->"Show Only Editor"
   5) Click View->"Show Editor Toolbar"
   6) There's now a checkmark next to View->"Show Editor Toolbar", even though 
there is no editor toolbar showing.
   
   The problem was that the relevant actions were wrapped in WrapperAction, 
which cannot track changes in selection state. The state is initialized once 
and never subsequently updated. The fact that the checkbox state sometimes 
seems to track actual changes is merely an accident--it just toggles itself 
whenever the action is invoked from that particular JCheckboxMenuItem (as 
opposed to from e.g. a keyboard shortcut or from another preference change).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to