You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Eirik Bakke (Jira)" <ji...@apache.org> on 2021/05/28 16:21:00 UTC

[jira] [Comment Edited] (NETBEANS-5726) Checkmark next to "Show Editor Toolbar" menu item can get out of sync with actual setting

    [ https://issues.apache.org/jira/browse/NETBEANS-5726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353440#comment-17353440 ] 

Eirik Bakke edited comment on NETBEANS-5726 at 5/28/21, 4:20 PM:
-----------------------------------------------------------------

The bug also appears if the "Toggle Toolbar" (="Show Editor Toolbar" in the menu) action is assigned a keyboard shortcut and invoked using the shortcut. The menu item just doesn't respond to external changes to the preferences.

This is due to the action being lazily initialized, which doesn't work for actions which need to track and show external state. Will submit a PR...


was (Author: ebakke):
The bug also appears if the "Toggle Toolbar" (="Show Editor Toolbar" in the menu) action is assigned a keyboard shortcut and invoked using the shortcut. The menu item just doesn't respond to external changes to the preferences.

This is due to the action being lazily initialized, which doesn't work for actions which need to track external state. Will submit a PR...

> Checkmark next to "Show Editor Toolbar" menu item can get out of sync with actual setting
> -----------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-5726
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5726
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: editor - Options
>    Affects Versions: 12.2
>         Environment: All OSes.
>            Reporter: Eirik Bakke
>            Priority: Major
>
> The checkmark next to the "Show Editor Toolbar" menu item can get out of sync with actual setting.
> 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.
> It seems the checkbox in the menu is inverted on every click rather than properly being bound to the underlying "toolbarVisible" preference from the java.util.prefs.Preferences system, which is (rightly) modified by the "Show Only Editor" action.
> (This bug report is a copy of the old BugZilla bug https://bz.apache.org/netbeans/show_bug.cgi?id=240513 .)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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