Gui: [skip ci] move handling of parameter ShowAxisCross from Document to View3DInventor

This commit is contained in:
wmayer
2020-05-30 11:32:34 +02:00
parent 1f63355c06
commit d3b8906dd0
2 changed files with 5 additions and 4 deletions

View File

@@ -1648,10 +1648,7 @@ MDIView *Document::createView(const Base::Type& typeId)
const char *ppReturn = 0;
view3D->onMsg(cameraSettings.c_str(),&ppReturn);
}
ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
if (hViewGrp->GetBool("ShowAxisCross",false)){
view3D->getViewer()->setAxisCross(true);
}
getMainWindow()->addWindow(view3D);
return view3D;
}

View File

@@ -161,6 +161,7 @@ View3DInventor::View3DInventor(Gui::Document* pcDocument, QWidget* parent,
// apply the user settings
OnChange(*hGrp,"EyeDistance");
OnChange(*hGrp,"CornerCoordSystem");
OnChange(*hGrp,"ShowAxisCross");
OnChange(*hGrp,"UseAutoRotation");
OnChange(*hGrp,"Gradient");
OnChange(*hGrp,"BackgroundColor");
@@ -366,6 +367,9 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
else if (strcmp(Reason,"CornerCoordSystem") == 0) {
_viewer->setFeedbackVisibility(rGrp.GetBool("CornerCoordSystem",true));
}
else if (strcmp(Reason,"ShowAxisCross") == 0) {
_viewer->setAxisCross(rGrp.GetBool("ShowAxisCross",false));
}
else if (strcmp(Reason,"UseAutoRotation") == 0) {
_viewer->setAnimationEnabled(rGrp.GetBool("UseAutoRotation",false));
}