Gui: [skip ci] move handling of parameter ShowAxisCross from Document to View3DInventor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user