mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +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")
|
else if (mode=="bright")
|
||||||
setLighting (&mLightingBright);
|
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;
|
LightingNight mLightingNight;
|
||||||
LightingBright mLightingBright;
|
LightingBright mLightingBright;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
void updateUserSetting (const QString &key, const QStringList &list);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void update();
|
void update();
|
||||||
|
@ -247,6 +247,8 @@ void CSVWorld::SceneSubView::replaceToolbarAndWorldspace (CSVRender::WorldspaceW
|
|||||||
mToolbar = toolbar;
|
mToolbar = toolbar;
|
||||||
|
|
||||||
connect (mScene, SIGNAL (focusToolbarRequest()), mToolbar, SLOT (setFocus()));
|
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()));
|
connect (mToolbar, SIGNAL (focusSceneRequest()), mScene, SLOT (setFocus()));
|
||||||
|
|
||||||
mLayout->addWidget (mToolbar, 0);
|
mLayout->addWidget (mToolbar, 0);
|
||||||
@ -254,4 +256,9 @@ void CSVWorld::SceneSubView::replaceToolbarAndWorldspace (CSVRender::WorldspaceW
|
|||||||
|
|
||||||
mScene->selectDefaultNavigationMode();
|
mScene->selectDefaultNavigationMode();
|
||||||
setFocusProxy (mScene);
|
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 cellSelectionChanged (const CSMWorld::UniversalId& id);
|
||||||
|
|
||||||
void handleDrop(const std::vector<CSMWorld::UniversalId>& data);
|
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