From 093314e264be27b6869035302c7035ac069cd6cc Mon Sep 17 00:00:00 2001 From: Bas Ruigrok Date: Sat, 20 Apr 2024 12:10:04 +0200 Subject: [PATCH] Gui: Remove unused methods --- src/Gui/GestureNavigationStyle.cpp | 10 ---------- src/Gui/GestureNavigationStyle.h | 2 -- src/Gui/NavigationStyle.cpp | 8 -------- src/Gui/NavigationStyle.h | 1 - 4 files changed, 21 deletions(-) diff --git a/src/Gui/GestureNavigationStyle.cpp b/src/Gui/GestureNavigationStyle.cpp index 30bf941f879a..01ef0aec9ec0 100644 --- a/src/Gui/GestureNavigationStyle.cpp +++ b/src/Gui/GestureNavigationStyle.cpp @@ -1010,16 +1010,6 @@ void GestureNavigationStyle::onRollGesture(int direction) } -void GestureNavigationStyle::onSetRotationCenter(SbVec2s cursor){ - SbBool ret = NavigationStyle::lookAtPoint(cursor); - if(!ret){ - this->interactiveCountDec(); //this was in original gesture nav. Not sure what is it needed for --DeepSOIC - Base::Console().Log( - "No object under cursor! Can't set new center of rotation.\n"); - } - -} - void GestureNavigationStyle::EventQueue::post(const NS::Event& ev) { ev.flags->processed = true; diff --git a/src/Gui/GestureNavigationStyle.h b/src/Gui/GestureNavigationStyle.h index 4ced3048adc0..3b8886799bd8 100644 --- a/src/Gui/GestureNavigationStyle.h +++ b/src/Gui/GestureNavigationStyle.h @@ -107,8 +107,6 @@ class GestureNavigationStyle: public UserNavigationStyle ///Roll gesture is like: press LMB, press RMB, release LMB, release RMB. /// This function is called by state machine whenever it picks up roll gesture. void onRollGesture(int direction); - ///Called by state machine, when set-rotation-center gesture is detected (MMB click, or H key) - void onSetRotationCenter(SbVec2s cursor); }; } diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index 7899ee190ddc..99595fd71d0c 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -629,14 +629,6 @@ void NavigationStyle::setupPanningPlane(const SoCamera* camera) } } -void NavigationStyle::panToCenter(const SbPlane & pplane, const SbVec2f & currpos) -{ - const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion(); - float ratio = vp.getViewportAspectRatio(); - panCamera(viewer->getSoRenderManager()->getCamera(), ratio, pplane, SbVec2f(0.5,0.5), currpos); - this->rotationCenterFound = false; -} - /** Dependent on the camera type this will either shrink or expand the * height of the viewport (orthogonal camera) or move the camera * closer or further away from the focal point in the scene. diff --git a/src/Gui/NavigationStyle.h b/src/Gui/NavigationStyle.h index fc03caeb02ae..854ed41b3b89 100644 --- a/src/Gui/NavigationStyle.h +++ b/src/Gui/NavigationStyle.h @@ -206,7 +206,6 @@ class GuiExport NavigationStyle : public Base::BaseClass const SbVec2f & previous, const SbVec2f & current); void setupPanningPlane(const SoCamera* camera); - void panToCenter(const SbPlane & pplane, const SbVec2f & currpos); int getDelta() const; void zoom(SoCamera * camera, float diffvalue); void zoomByCursor(const SbVec2f & thispos, const SbVec2f & prevpos);