diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 4b2d5b410..3cc407ff0 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -1972,7 +1972,7 @@ void StdBoxSelection::activated(int iMsg) if (view) { View3DInventorViewer* viewer = view->getViewer(); if (!viewer->isSelecting()) { - viewer->startSelection(View3DInventorViewer::Rectangle); + viewer->startSelection(View3DInventorViewer::Rubberband); viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), selectionCallback); } } diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index 1629c026a..84aac6696 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -576,7 +576,6 @@ bool Document::saveAs(void) if (!fn.isEmpty()) { QFileInfo fi; fi.setFile(fn); - QString bn = fi.baseName(); const char * DocName = App::GetApplication().getDocumentName(getDocument()); diff --git a/src/Gui/MouseSelection.cpp b/src/Gui/MouseSelection.cpp index 6a3b52d8d..41f1cae41 100644 --- a/src/Gui/MouseSelection.cpp +++ b/src/Gui/MouseSelection.cpp @@ -755,7 +755,7 @@ int RectangleSelection::keyboardEvent( const SoKeyboardEvent * const e ) // ----------------------------------------------------------------------------------- -class Rubberband::Private : public Gui::GLGraphicsItem +class RubberbandSelection::Private : public Gui::GLGraphicsItem { Gui::View3DInventorViewer* viewer; int x_old, y_old, x_new, y_new; @@ -813,16 +813,16 @@ public: } }; -Rubberband::Rubberband() +RubberbandSelection::RubberbandSelection() { d = 0; } -Rubberband::~Rubberband() +RubberbandSelection::~RubberbandSelection() { } -void Rubberband::initialize() +void RubberbandSelection::initialize() { d = new Private(_pcView3D); _pcView3D->addGraphicsItem(d); @@ -830,7 +830,7 @@ void Rubberband::initialize() _pcView3D->scheduleRedraw(); } -void Rubberband::terminate() +void RubberbandSelection::terminate() { _pcView3D->removeGraphicsItem(d); delete d; d = 0; @@ -838,11 +838,11 @@ void Rubberband::terminate() _pcView3D->scheduleRedraw(); } -void Rubberband::draw () +void RubberbandSelection::draw () { } -int Rubberband::mouseButtonEvent(const SoMouseButtonEvent * const e, const QPoint& pos) +int RubberbandSelection::mouseButtonEvent(const SoMouseButtonEvent * const e, const QPoint& pos) { const int button = e->getButton(); const SbBool press = e->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; @@ -881,7 +881,7 @@ int Rubberband::mouseButtonEvent(const SoMouseButtonEvent * const e, const QPoin return ret; } -int Rubberband::locationEvent(const SoLocation2Event * const e, const QPoint& pos) +int RubberbandSelection::locationEvent(const SoLocation2Event * const e, const QPoint& pos) { m_iXnew = pos.x(); m_iYnew = pos.y(); @@ -890,7 +890,7 @@ int Rubberband::locationEvent(const SoLocation2Event * const e, const QPoint& po return Continue; } -int Rubberband::keyboardEvent(const SoKeyboardEvent * const e) +int RubberbandSelection::keyboardEvent(const SoKeyboardEvent * const e) { return Continue; } @@ -907,7 +907,7 @@ BoxZoomSelection::~BoxZoomSelection() void BoxZoomSelection::terminate() { - Rubberband::terminate(); + RubberbandSelection::terminate(); int xmin = std::min(m_iXold, m_iXnew); int xmax = std::max(m_iXold, m_iXnew); diff --git a/src/Gui/MouseSelection.h b/src/Gui/MouseSelection.h index 0ebb4601f..70aa8548d 100644 --- a/src/Gui/MouseSelection.h +++ b/src/Gui/MouseSelection.h @@ -231,11 +231,11 @@ private: * Draws a rectangle for selection * \author Werner Mayer */ -class GuiExport Rubberband : public BaseMouseSelection +class GuiExport RubberbandSelection : public BaseMouseSelection { public: - Rubberband(); - virtual ~Rubberband(); + RubberbandSelection(); + virtual ~RubberbandSelection(); /// do nothing virtual void initialize(); @@ -262,7 +262,7 @@ private: * Draws a rectangle for box zooming * \author Werner Mayer */ -class GuiExport BoxZoomSelection : public Rubberband +class GuiExport BoxZoomSelection : public RubberbandSelection { public: BoxZoomSelection(); diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index b7380aaad..4e802362f 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -1068,6 +1068,9 @@ void NavigationStyle::startSelection(NavigationStyle::SelectionMode mode) case Rectangle: mouseSelection = new RectangleSelection(); break; + case Rubberband: + mouseSelection = new RubberbandSelection(); + break; case BoxZoom: mouseSelection = new BoxZoomSelection(); break; diff --git a/src/Gui/NavigationStyle.h b/src/Gui/NavigationStyle.h index 2e4900173..b801857ea 100644 --- a/src/Gui/NavigationStyle.h +++ b/src/Gui/NavigationStyle.h @@ -87,8 +87,9 @@ public: enum SelectionMode { Lasso = 0, /**< Select objects using a lasso. */ Rectangle = 1, /**< Select objects using a rectangle. */ - BoxZoom = 2, /**< Perform a box zoom. */ - Clip = 3, /**< Clip objects using a lasso. */ + Rubberband = 2, /**< Select objects using a rubberband. */ + BoxZoom = 3, /**< Perform a box zoom. */ + Clip = 4, /**< Clip objects using a lasso. */ }; enum OrbitStyle { diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h index c8e2384ac..44c474761 100644 --- a/src/Gui/View3DInventorViewer.h +++ b/src/Gui/View3DInventorViewer.h @@ -78,8 +78,9 @@ public: enum SelectionMode { Lasso = 0, /**< Select objects using a lasso. */ Rectangle = 1, /**< Select objects using a rectangle. */ - BoxZoom = 2, /**< Perform a box zoom. */ - Clip = 3, /**< Clip objects using a lasso. */ + Rubberband = 2, /**< Select objects using a rubberband. */ + BoxZoom = 3, /**< Perform a box zoom. */ + Clip = 4, /**< Clip objects using a lasso. */ }; /** @name Modus handling of the viewer * Here the you can switch on/off several features