Created attachment 190792 [details] file for use to repro bug Steps to repro this bug: 1. Open the attached Draw file. 2. Right-click on the Layer5 blue colored text tab. Results: Show Layer (Shift+Click) menu item is checked. Expected Results: Show Layer menu item is not checked because it is set not visible (indicated by the tabs blue text color). 3. With the popup menu still showing, right-click on the Layer4 tab. Results: Popup menu closes as expected. 4. Right-click again on the Layer4 tab. Results: Show Layer menu item is not checked. Expected Results: Show Layer menu item is checked because it is set visible. Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e70f5d3db3ad64c3d6a21de998b238bd5d4ac8b5 CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: x11 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded The cause seems to be an issue with how the layer switch command is dispatched in void LayerTabBar::Select()[1]. Changing the dispatcher execute call mode parameter argument from SfxCallMode::ASYNCHRON to SfxCallMode::SYNCHRON produces expected Show Layer menu item results for me. Including Heiko who did the work for enhancement bug 113439 that added the Show Layer menu item. [1] https://opengrok.libreoffice.org/xref/core/sd/source/ui/dlg/LayerTabBar.cxx?r=9b9159aa#137
Wouldn't it be easy to just rename the command to "Hide Layer"? Usually labels should be phrased positively but in this case it is about explicitly hiding. Nothing to say against change the internal logic, although it involves more effort.
(In reply to Heiko Tietze from comment #1) > Wouldn't it be easy to just rename the command to "Hide Layer"? Usually > labels should be phrased positively but in this case it is about explicitly > hiding. Nothing to say against change the internal logic, although it > involves more effort. In this case it seems to me better to use "Hide Layer". The effort to rename and change the internal logic isn't so much. Here's a link to a patch that renames/reworks the menu item and fixes the reported bug: https://gerrit.libreoffice.org/c/core/+/159427
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7f79b0caf194ff9d7dfa2f85379a5c752c905476 tdf#158179 Fix layer tab menu layer visibility check menu item It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.