diff --git a/src/Gui/DlgSettings3DView.ui b/src/Gui/DlgSettings3DView.ui
index 5b690eee5d..127c948b0e 100644
--- a/src/Gui/DlgSettings3DView.ui
+++ b/src/Gui/DlgSettings3DView.ui
@@ -50,20 +50,71 @@
-
-
-
- Show navigation cube
-
-
- true
-
-
- ShowNaviCube
-
-
- View
-
-
+
+
-
+
+
+ Show navigation cube
+
+
+ true
+
+
+ ShowNaviCube
+
+
+ View
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Corner
+
+
+
+ -
+
+
+ 1
+
+
-
+
+ Top left
+
+
+ -
+
+ Top right
+
+
+ -
+
+ Bottom left
+
+
+ -
+
+ Bottom right
+
+
+
+
+
-
diff --git a/src/Gui/DlgSettings3DViewImp.cpp b/src/Gui/DlgSettings3DViewImp.cpp
index b1664666c4..e1b638cc65 100644
--- a/src/Gui/DlgSettings3DViewImp.cpp
+++ b/src/Gui/DlgSettings3DViewImp.cpp
@@ -80,6 +80,9 @@ void DlgSettings3DViewImp::saveSettings()
index = this->comboAliasing->currentIndex();
hGrp->SetInt("AntiAliasing", index);
+ index = this->naviCubeCorner->currentIndex();
+ hGrp->SetInt("CornerNaviCube", index);
+
checkBoxZoomAtCursor->onSave();
checkBoxInvertZoom->onSave();
spinBoxZoomStep->onSave();
@@ -129,6 +132,9 @@ void DlgSettings3DViewImp::loadSettings()
// connect after setting current item of the combo box
connect(comboAliasing, SIGNAL(currentIndexChanged(int)),
this, SLOT(onAliasingChanged(int)));
+
+ index = hGrp->GetInt("CornerNaviCube", 1);
+ naviCubeCorner->setCurrentIndex(index);
}
void DlgSettings3DViewImp::on_mouseButton_clicked()
diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp
index 8eb41b6ce9..61321c38c9 100644
--- a/src/Gui/NaviCube.cpp
+++ b/src/Gui/NaviCube.cpp
@@ -290,6 +290,8 @@ bool NaviCube::processSoEvent(const SoEvent* ev) {
void NaviCube::setCorner(Corner c) {
m_NaviCubeImplementation->m_Corner = c;
+ m_NaviCubeImplementation->m_PrevWidth = 0;
+ m_NaviCubeImplementation->m_PrevHeight = 0;
}
NaviCubeImplementation::NaviCubeImplementation(
diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp
index 9f92c3ab56..134d5a7a46 100644
--- a/src/Gui/View3DInventor.cpp
+++ b/src/Gui/View3DInventor.cpp
@@ -365,6 +365,9 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
else if (strcmp(Reason,"ShowNaviCube") == 0) {
_viewer->setEnabledNaviCube(rGrp.GetBool("ShowNaviCube",true));
}
+ else if (strcmp(Reason,"CornerNaviCube") == 0) {
+ _viewer->setNaviCubeCorner(rGrp.GetInt("CornerNaviCube",0));
+ }
else if (strcmp(Reason,"UseVBO") == 0) {
_viewer->setEnabledVBO(rGrp.GetBool("UseVBO",false));
}
diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp
index 72cf36f04a..0620818090 100644
--- a/src/Gui/View3DInventorViewer.cpp
+++ b/src/Gui/View3DInventorViewer.cpp
@@ -849,6 +849,12 @@ bool View3DInventorViewer::isEnabledNaviCube(void) const
return naviCubeEnabled;
}
+void View3DInventorViewer::setNaviCubeCorner(int c)
+{
+ if (naviCube)
+ naviCube->setCorner(static_cast(c));
+}
+
void View3DInventorViewer::setAxisCross(bool on)
{
SoNode* scene = getSceneGraph();
diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h
index f3866f584a..e9d517109c 100644
--- a/src/Gui/View3DInventorViewer.h
+++ b/src/Gui/View3DInventorViewer.h
@@ -346,6 +346,7 @@ public:
void setEnabledFPSCounter(bool b);
void setEnabledNaviCube(bool b);
bool isEnabledNaviCube(void) const;
+ void setNaviCubeCorner(int);
void setEnabledVBO(bool b);
bool isEnabledVBO() const;