Gui: recreate NaviCubes of all 3D views
This commit is contained in:
@@ -112,13 +112,20 @@ void DlgSettingsNavigation::saveSettings()
|
||||
"User parameter:BaseApp/Preferences/NaviCube");
|
||||
hGrp->SetASCII("FontString", ui->naviCubeFontName->currentText().toLatin1());
|
||||
|
||||
recreateNaviCubes();
|
||||
}
|
||||
|
||||
void DlgSettingsNavigation::recreateNaviCubes()
|
||||
{
|
||||
// we changed the cube's layout, therefore we must re-initialize it
|
||||
// by deleting and the subsequently recreating
|
||||
auto mdi = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (mdi) {
|
||||
auto currentView = mdi->getViewer();
|
||||
currentView->deleteNavigationCube();
|
||||
currentView->createNavigationCube();
|
||||
auto views = getMainWindow()->windows();
|
||||
for (auto view : views) {
|
||||
if (auto view3d = qobject_cast<View3DInventor*>(view)) {
|
||||
auto viewer = view3d->getViewer();
|
||||
viewer->deleteNavigationCube();
|
||||
viewer->createNavigationCube();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ public:
|
||||
private:
|
||||
void onMouseButtonClicked();
|
||||
void onNewDocViewChanged(int);
|
||||
void recreateNaviCubes();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
Reference in New Issue
Block a user