mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Update SceneWidget when relevant user settings change.
This commit is contained in:
parent
9902e08773
commit
8a0ff17c22
@ -397,4 +397,10 @@ namespace CSVRender
|
||||
else if (mode=="bright")
|
||||
setLighting (&mLightingBright);
|
||||
}
|
||||
|
||||
void SceneWidget::updateUserSetting (const QString &key, const QStringList &list)
|
||||
{
|
||||
if(key.contains(QRegExp("^\\b(Objects|Shader|Scene)", Qt::CaseInsensitive)))
|
||||
flagAsModified();
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,10 @@ namespace CSVRender
|
||||
LightingNight mLightingNight;
|
||||
LightingBright mLightingBright;
|
||||
|
||||
public slots:
|
||||
|
||||
void updateUserSetting (const QString &key, const QStringList &list);
|
||||
|
||||
private slots:
|
||||
|
||||
void update();
|
||||
|
@ -247,6 +247,8 @@ void CSVWorld::SceneSubView::replaceToolbarAndWorldspace (CSVRender::WorldspaceW
|
||||
mToolbar = toolbar;
|
||||
|
||||
connect (mScene, SIGNAL (focusToolbarRequest()), mToolbar, SLOT (setFocus()));
|
||||
connect (this, SIGNAL (updateSceneUserSetting(const QString &, const QStringList &)),
|
||||
mScene, SLOT (updateUserSetting(const QString &, const QStringList &)));
|
||||
connect (mToolbar, SIGNAL (focusSceneRequest()), mScene, SLOT (setFocus()));
|
||||
|
||||
mLayout->addWidget (mToolbar, 0);
|
||||
@ -254,4 +256,9 @@ void CSVWorld::SceneSubView::replaceToolbarAndWorldspace (CSVRender::WorldspaceW
|
||||
|
||||
mScene->selectDefaultNavigationMode();
|
||||
setFocusProxy (mScene);
|
||||
}
|
||||
}
|
||||
|
||||
void CSVWorld::SceneSubView::updateUserSetting (const QString &key, const QStringList &list)
|
||||
{
|
||||
emit updateSceneUserSetting(key, list);
|
||||
}
|
||||
|
@ -82,6 +82,14 @@ namespace CSVWorld
|
||||
void cellSelectionChanged (const CSMWorld::UniversalId& id);
|
||||
|
||||
void handleDrop(const std::vector<CSMWorld::UniversalId>& data);
|
||||
|
||||
public slots:
|
||||
|
||||
void updateUserSetting (const QString &, const QStringList &);
|
||||
|
||||
signals:
|
||||
|
||||
void updateSceneUserSetting (const QString &, const QStringList &);
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user