Bug 139879 - Menubar menu does not update changes in shortcut key assignments when two keys are assigned to same command and then a change is made
Summary: Menubar menu does not update changes in shortcut key assignments when two key...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 144394 (view as bug list)
Depends on:
Blocks: Shortcuts-Accelerators
  Show dependency treegraph
 
Reported: 2021-01-24 10:11 UTC by sdc.blanco
Modified: 2023-09-04 13:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2021-01-24 10:11:38 UTC
For demonstrations of problem:

Use Tools > Customize > Keyboard tab
   (and Tools - Options - Libreoffice - View in Visibility Section, Shortcuts 
    should be "Automatic" or "Show")

Test 1
1. Open Customize keyboard dialog.
2. Use Functions search box to find "Customize".
3. Find Alt+F11 in Shortcut keys, press "Modify" to assign Alt-F11 to "Customize".
4. Press OK to exit dialog, then choose Tools menu.

Actual and expected result: Alt-F11 appears next to "Customize" in Tools menu.

5. Open Customize keyboard dialog again and assign Alt-F9 to "Customize"   
       (in dialog box, Keys section shows Alt+F9 and Alt+F11)
6. Press OK to exit dialog, then choose Tools menu.

Actual:  Alt+F9 appears as shortcut for Customize in Tools menu.
(no expectation, Alt+F9 is fine)

7. Open Customize keyboard dialog again.
8. Find Alt+F9, and Delete its assignment to "Customize"
      (Alt+F11 should be shown as still assigned to "Customize")
9. Press OK to exit dialog, then choose Tools menu.

Actual:  no shortcut shown in Tools menu for "Customize"
Expected:  to see Alt+F11

Additional information: 
a. Alt+F11 still works as shortcut, but not shown in menu
b. If Alt+F11 was deleted in step 8 instead of Alt+F9, then same result, nothing shown in Tools menu, but Alt+F9 works as expected.

[ General case?:  same command assigned to different keys, and then one key assignment is deleted. ]


Test 2  (same procedure, but now in abbreviated form)

1. Assign "Options" to Alt-F12 (in Writer, if not already assigned)

    Result: shows Alt+F12 for Options in Tools menu

2. Assign "Options" to Alt+F9  

    Result: shows Alt+F9 for Options in Tools menu

3. Assign Customize to Alt+F9  

Actual result:  both "Customize" and "Options" in Tools menu show Alt+F9 as shortcut
Expected result: "Options" should show Alt-F12 as shortcut


Additional information:

Alt+F12 works to open Options dialog, even though it shows Alt+F9 in Tools menu

[ General case?:  same command assigned to different keys, and then one key assignment is changed. ]


Have not tried other variations or other LO applications, but these two examples should be sufficient to show that something wrong with the logic for displaying shortcuts in the menus, when same command is assigned to two different keys, and then a change (delete or reassignment) is made.
Comment 1 Dieter 2021-02-08 07:22:26 UTC
I confirm test 1 with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 396c2ad2daad6fe6a11703d0ae1593929834afe2
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded
Comment 2 S.Zosgornik 2021-09-09 15:56:18 UTC
*** Bug 144394 has been marked as a duplicate of this bug. ***
Comment 3 S.Zosgornik 2021-09-09 16:35:51 UTC
For me in version 7.2.0.4 does neither the main menu nor the toolbar tips update after deleting or changing keybindings.
It only updates after new assignments the menubar . 

Steps:
1. assign a new keybinding to an uno:command that doesn't have any binding yet
 -> menu gets updated
 -> toolbar tip is still empty
2. open an new toolbar View > Toolbars
 -> all toolbars gets updated and show the new keybinding
3. delete the keybinding again
 -> menu bar and toolbar tips still show the just deleted shortcut
4. bind the same uno item to another keybinding
 -> menu and toolbar still show the obsolete binding
5. close and reopen the application
-> the new keybinding is finally shown
Comment 4 Sophie Sipasseuth 2023-09-04 13:40:16 UTC
Repro

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 574c57090642347980d2395e1e183cc7b5c171ad
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: en-US
Calc: threaded