| 136 | } |
| 137 | |
| 138 | void DrawPointTool::createObject() |
| 139 | { |
| 140 | PointObject* point = preview_object->duplicate()->asPoint(); |
| 141 | |
| 142 | int index = map()->addObject(point); |
| 143 | map()->clearObjectSelection(false); |
| 144 | map()->addObjectToSelection(point, true); |
| 145 | map()->setObjectsDirty(); |
| 146 | |
| 147 | auto undo_step = new DeleteObjectsUndoStep(map()); |
| 148 | undo_step->addObject(index); |
| 149 | map()->push(undo_step); |
| 150 | } |
| 151 | |
| 152 | void DrawPointTool::leaveEvent(QEvent* /*unused*/) |
| 153 | { |
nothing calls this directly
no test coverage detected