Improve Axis Cross behavior and expose parameter to 3D View preferences

This commit is contained in:
Adrian
2020-05-15 14:27:17 -04:00
committed by wwmayer
parent 8944a9cfbe
commit 1f63355c06
6 changed files with 29 additions and 9 deletions

View File

@@ -1648,6 +1648,10 @@ 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;
}
@@ -1666,6 +1670,8 @@ Gui::MDIView* Document::cloneView(Gui::MDIView* oldview)
std::string overrideMode = firstView->getViewer()->getOverrideMode();
view3D->getViewer()->setOverrideMode(overrideMode);
view3D->getViewer()->setAxisCross(firstView->getViewer()->hasAxisCross());
// attach the viewproviders. we need to make sure that we only attach the toplevel ones
// and not viewproviders which are claimed by other providers. To ensure this we first
// add all providers and then remove the ones already claimed