# HG changeset patch # User Benjamin Golinvaux # Date 1588591086 -7200 # Node ID 07fac4fdbe0760cf9497e2921d3870c65c0ff4a9 # Parent 875c9a28236e7b9029f1acad638163ca4dac94e9 Removed dead code (RtViewer is not supposed to demonstrate measuring tools in a simple example) diff -r 875c9a28236e -r 07fac4fdbe07 Samples/Common/RtViewerApp.cpp --- a/Samples/Common/RtViewerApp.cpp Mon May 04 13:17:31 2020 +0200 +++ b/Samples/Common/RtViewerApp.cpp Mon May 04 13:18:06 2020 +0200 @@ -60,33 +60,6 @@ namespace OrthancStone { - const char* RtViewerGuiToolToString(size_t i) - { - static const char* descs[] = { - "RtViewerGuiTool_Rotate", - "RtViewerGuiTool_Pan", - "RtViewerGuiTool_Zoom", - "RtViewerGuiTool_LineMeasure", - "RtViewerGuiTool_CircleMeasure", - "RtViewerGuiTool_AngleMeasure", - "RtViewerGuiTool_EllipseMeasure", - "RtViewerGuiTool_LAST" - }; - if (i >= RtViewerGuiTool_LAST) - { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, "Wrong tool index"); - } - return descs[i]; - } - - void RtViewerApp::SelectNextTool() - { - currentTool_ = static_cast(currentTool_ + 1); - if (currentTool_ == RtViewerGuiTool_LAST) - currentTool_ = static_cast(0);; - printf("Current tool is now: %s\n", RtViewerGuiToolToString(currentTool_)); - } - void RtViewerApp::InvalidateAllViewports() { for (size_t i = 0; i < views_.size(); ++i) @@ -104,8 +77,7 @@ } RtViewerApp::RtViewerApp() - : currentTool_(RtViewerGuiTool_Rotate) - , undoStack_(new UndoStack) + : undoStack_(new UndoStack) { // Create the volumes that will be filled later on ctVolume_ = boost::make_shared(); diff -r 875c9a28236e -r 07fac4fdbe07 Samples/Common/RtViewerApp.h --- a/Samples/Common/RtViewerApp.h Mon May 04 13:17:31 2020 +0200 +++ b/Samples/Common/RtViewerApp.h Mon May 04 13:18:06 2020 +0200 @@ -51,20 +51,6 @@ class SdlOpenGLViewport; class RtViewerView; - enum RtViewerGuiTool - { - RtViewerGuiTool_Rotate = 0, - RtViewerGuiTool_Pan, - RtViewerGuiTool_Zoom, - RtViewerGuiTool_LineMeasure, - RtViewerGuiTool_CircleMeasure, - RtViewerGuiTool_AngleMeasure, - RtViewerGuiTool_EllipseMeasure, - RtViewerGuiTool_LAST - }; - - const char* MeasureToolToString(size_t i); - static const unsigned int FONT_SIZE_0 = 32; static const unsigned int FONT_SIZE_1 = 24; @@ -172,7 +158,6 @@ boost::shared_ptr activeTracker_; - RtViewerGuiTool currentTool_; boost::shared_ptr undoStack_; };