Skip to content

Conversation

dl3sdo
Copy link
Member

@dl3sdo dl3sdo commented Oct 14, 2025

Extend point symbol editor to create point, line and area subsymbols from selected objects.

Closes GH-2425 (Create point symbols from selected objects).

Extend point symbol editor to create point, line and area subsymbols
from selected objects.

Closes OpenOrienteeringGH-2425 (Create point symbols from selected objects).
@dl3sdo dl3sdo marked this pull request as draft October 14, 2025 22:25
namespace OpenOrienteering {

PointSymbolEditorWidget::PointSymbolEditorWidget(MapEditorController* controller, PointSymbol* symbol, SymbolRole role, qreal offset_y, QWidget* parent)
PointSymbolEditorWidget::PointSymbolEditorWidget(MapEditorController* controller, PointSymbol* symbol, Map* source_map, SymbolRole role, qreal offset_y, QWidget* parent)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early feedback:
I don't think we should add another parameter. The source map is implicitly known, via controller and symbol.
(Another suggested workflow was copy-and-paste. This would use a different Map, with all complications. And you wouldn't get that Map at constuction time, before "Paste".)

Copy link
Member Author

@dl3sdo dl3sdo Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also didn't like to add a new parameter but had not found a better alternative.
The newly created controller being passed to PointSymbolEditorWidget only knows the preview map but does not know the source_map, neither does the symbol. There is certainly the previously active controller who 'knows' the source map but I don't know how PointSymbolEditorWidget can access it.
MapEditorController describes itself as a 'HACK' for being used in the symbol editor for the preview. MapEditorController could be extended to store the source map in addition as it's already considering the symbol editing usecase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create point symbols from selected objects

2 participants