Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/ViewportController.cpp @ 1020:ac88989817e3 toa2019093001
TrackerCommand --> MeasureCommand + fuse against exception in MeasureTool dtor
+ added DeleteMeasureCommand + moved the various concrete measuring tool-related
classes to their pre-assigned file locations (everything was crammed into
MeasureCommands.* files up to this commit) + added double-click handler to
GuiAdapter (for TOA implementation of "delete measuring tool on double-click")
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 30 Sep 2019 10:41:06 +0200 |
parents | a911f5bb48da |
children | 348866dd217c |
comparison
equal
deleted
inserted
replaced
1019:29f5f2031310 | 1020:ac88989817e3 |
---|---|
36 , undoStackW_(undoStackW) | 36 , undoStackW_(undoStackW) |
37 , canvasToSceneFactor_(0.0) | 37 , canvasToSceneFactor_(0.0) |
38 , viewport_(viewport) | 38 , viewport_(viewport) |
39 { | 39 { |
40 } | 40 } |
41 | |
42 ViewportController::~ViewportController() | |
43 { | |
44 | |
45 } | |
41 | 46 |
42 boost::shared_ptr<UndoStack> ViewportController::GetUndoStack() | 47 boost::shared_ptr<UndoStack> ViewportController::GetUndoStack() |
43 { | 48 { |
44 return undoStackW_.lock(); | 49 return undoStackW_.lock(); |
45 } | 50 } |
47 boost::shared_ptr<const UndoStack> ViewportController::GetUndoStack() const | 52 boost::shared_ptr<const UndoStack> ViewportController::GetUndoStack() const |
48 { | 53 { |
49 return undoStackW_.lock(); | 54 return undoStackW_.lock(); |
50 } | 55 } |
51 | 56 |
52 void ViewportController::PushCommand(boost::shared_ptr<TrackerCommand> command) | 57 void ViewportController::PushCommand(boost::shared_ptr<MeasureCommand> command) |
53 { | 58 { |
54 boost::shared_ptr<UndoStack> undoStack = undoStackW_.lock(); | 59 boost::shared_ptr<UndoStack> undoStack = undoStackW_.lock(); |
55 if(undoStack.get() != NULL) | 60 if(undoStack.get() != NULL) |
56 undoStack->PushCommand(command); | 61 undoStack->PushCommand(command); |
57 else | 62 else |