OpenOrienteering / mapper

OpenOrienteering Mapper is a software for creating maps for the orienteering sport.
https://www.openorienteering.org/apps/mapper/
GNU General Public License v3.0
399 stars 106 forks source link

MapEditorController: Disable menu item if no symbols are selected #2261

Closed dl3sdo closed 2 months ago

dl3sdo commented 2 months ago

The 'Select all objects with selected symbols' menu item below the 'Edit' menu was enabled even if no symbols were selected. The same menu item in the popup symbol menu of the symbol pane however was disabled if no symbols were selected. Move the enabling or disabling of the menu item to a function which is called by a change of the selected symbols and disable the menu item if no symbols are selected.

dl3sdo commented 2 months ago

/azp run

azure-pipelines[bot] commented 2 months ago
Azure Pipelines successfully started running 1 pipeline(s).
dg0yt commented 2 months ago

Generally there should be just a single action reused across the UI (main menu, toolbar, context menu).

dl3sdo commented 2 months ago

I agree that removing it from the Edit menu is more appropriate indeed of improving its appearance, especially since it's still different as the menu item in the symbol widget context menu would even change from 'Select all objects with this symbol' to 'Select all objects with selected symbols' which the Edit menu's version does not (yet).

Thus I will create a new PR that removes this Edit menu entry, ok?

lpechacek commented 2 months ago

@dl3sdo I've removed myself from the assignee role. I've tested and reviewed the change but I'm not going to do more (e.g. merge) on it. Thanks!

dl3sdo commented 2 months ago

@lpechacek: thank you for spending time on that issue. BTW: that was an error by myself, I wanted to assign you as reviewer but accidentally ended up assigning the issue to you,

dg0yt commented 2 months ago

Thanks to all.

dg0yt commented 2 months ago

Thus I will create a new PR that removes this Edit menu entry, ok?

The Edit menu isn't too cluttered ATM.

This particular menu item is probably more discoverable if you already selected some object in the map and want to select all objects with the same symbol.

dl3sdo commented 2 months ago

The Edit menu isn't too cluttered ATM.

This particular menu item is probably more discoverable if you already selected some object in the map and want to select all objects with the same symbol.

Indeed, it works and it's not a bug, so fine for me keeping it.