mirror of
https://github.com/clechasseur/pathcopycopy.git
synced 2026-04-25 04:05:55 +03:00
[GH-ISSUE #170] [BUG] Deselecting all commands from submenu actually displays all commands instead of none in the submenu #166
Labels
No labels
bug
duplicate
enhancement
enhancement
enhancement
fixed
help wanted
help wanted
invalid
pull-request
question
waiting for input
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pathcopycopy#166
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ulu on GitHub (Aug 1, 2023).
Original GitHub issue: https://github.com/clechasseur/pathcopycopy/issues/170
Originally assigned to: @clechasseur on GitHub.
Describe the bug
removing all entries from submenu resulting in a garbaged submenu.
To Reproduce
Steps to reproduce the behavior:
go to UNC-Path and right right click on an entry
click on "Path Copy > Settings..."
remove all check marks
set check marks for "copy long UNC path" in "Main menu" and "Submenu"
click "OK" button
right right click on an UNC-Path entry
see a main menu entry for "copy long UNC path"
right right click on an UNC-Path entry
click on "Path Copy > "
see a Submenu with 2 entries: "copy long UNC path" and "Settings ..."
click on "Path Copy > Settings..."
remove all check marks
set check marks for "copy long UNC path" only in "Main menu"
click "OK" button
right right click on an UNC-Path entry
see a main menu entry for "copy long UNC path"
right right click on an UNC-Path entry
click on "Path Copy > "
[ERROR] see a Submenu with lots of entries
Expected behavior
I want to see no submenu entries except "Settings ..." if I have only "Main menu" entries. My preferred solution is to get rid of the menu entry in context menu (explorer right click) at all. The visibility of the submenu structure in context menu (explorer right click) should be configurable. Because the settings are accessible over windows menu and I only want the Opt-In features I checked in pathcopycopy configuration.
Screenshots


Software (please complete the following information):
@clechasseur commented on GitHub (Aug 2, 2023):
This is due to this part of the code:
https://github.com/clechasseur/pathcopycopy/blob/default/PathCopyCopy/src/PathCopyCopyContextMenuExt.cpp#L422-L423
I think this is due to a legacy behavior that should have been removed, but I'm not sure yet.
@ulu commented on GitHub (Aug 8, 2023):
Seems a good line to start. You could check it by removing the complete line from the code. But you will get a nullptr exception in line 429. So you have to guard this code with a check for a nullptr like
if (pvspPlugins != nullptr)In addition I would not rely on the try-catch because it is forwarded in the catch block.
Currently I have no cpp environment installed. So I cannot help here at the moment...
@clechasseur commented on GitHub (Aug 9, 2023):
I think this is mostly due to legacy behavior - the way to store commands displayed in the submenu has evolved quite a lot over the years and gone through at least two major refactorings. Now, we should consider an empty list to be different from the absence of a setting - we do that for the main menu, but not for the submenu, which is a bug.