MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / objectSelectionChangedImpl

Method objectSelectionChangedImpl

src/tools/edit_point_tool.cpp:543–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543void EditPointTool::objectSelectionChangedImpl()
544{
545 if (text_editor)
546 {
547 // This case can be reproduced by using "select all objects of symbol" for any symbol while editing a text.
548 // Revert selection to text object in order to be able to finish editing. Not optimal, but better than crashing.
549 map()->clearObjectSelection(false);
550 map()->addObjectToSelection(text_editor->object(), false);
551 finishEditing();
552 map()->emitSelectionChanged();
553 return;
554 }
555
556 if (isDragging())
557 {
558 cancelDragging();
559 }
560 else
561 {
562 updateHoverState(cur_pos_map);
563 updateDirtyRect();
564 updateStatusText();
565 }
566}
567
568int EditPointTool::updateDirtyRectImpl(QRectF& rect)
569{

Callers

nothing calls this directly

Calls 4

clearObjectSelectionMethod · 0.80
addObjectToSelectionMethod · 0.80
objectMethod · 0.80
emitSelectionChangedMethod · 0.80

Tested by

no test coverage detected