|
|
|
@ -27,8 +27,7 @@
|
|
|
|
|
#include "creator.hpp"
|
|
|
|
|
|
|
|
|
|
CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
|
|
|
|
: SubView (id), mScene(NULL), mLayout(new QHBoxLayout), mDocument(document), mToolbar(NULL),
|
|
|
|
|
mEditMode (0), mLocked (false)
|
|
|
|
|
: SubView (id), mScene(NULL), mLayout(new QHBoxLayout), mDocument(document), mToolbar(NULL)
|
|
|
|
|
{
|
|
|
|
|
QVBoxLayout *layout = new QVBoxLayout;
|
|
|
|
|
|
|
|
|
@ -123,16 +122,14 @@ CSVWidget::SceneToolbar* CSVWorld::SceneSubView::makeToolbar (CSVRender::Worldsp
|
|
|
|
|
CSVWidget::SceneToolRun *runTool = widget->makeRunTool (toolbar);
|
|
|
|
|
toolbar->addTool (runTool);
|
|
|
|
|
|
|
|
|
|
mEditMode = widget->makeEditModeSelector (toolbar);
|
|
|
|
|
toolbar->addTool (mEditMode);
|
|
|
|
|
toolbar->addTool (widget->makeEditModeSelector (toolbar));
|
|
|
|
|
|
|
|
|
|
return toolbar;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::SceneSubView::setEditLock (bool locked)
|
|
|
|
|
{
|
|
|
|
|
mLocked = locked;
|
|
|
|
|
dynamic_cast<CSVRender::EditMode&> (*mEditMode->getCurrent()).setEditLock (locked);
|
|
|
|
|
mScene->setEditLock (locked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::SceneSubView::setStatusBar (bool show)
|
|
|
|
@ -153,7 +150,6 @@ std::string CSVWorld::SceneSubView::getTitle() const
|
|
|
|
|
void CSVWorld::SceneSubView::updateUserSetting (const QString& name, const QStringList& value)
|
|
|
|
|
{
|
|
|
|
|
mScene->updateUserSetting (name, value);
|
|
|
|
|
dynamic_cast<CSVRender::EditMode&> (*mEditMode->getCurrent()).updateUserSetting (name, value);
|
|
|
|
|
CSVDoc::SubView::updateUserSetting (name, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -259,12 +255,4 @@ void CSVWorld::SceneSubView::replaceToolbarAndWorldspace (CSVRender::WorldspaceW
|
|
|
|
|
|
|
|
|
|
mScene->selectDefaultNavigationMode();
|
|
|
|
|
setFocusProxy (mScene);
|
|
|
|
|
|
|
|
|
|
connect (mEditMode, SIGNAL (modeChanged (const std::string&)),
|
|
|
|
|
this, SLOT (editModeChanged (const std::string&)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::SceneSubView::editModeChanged (const std::string& id)
|
|
|
|
|
{
|
|
|
|
|
dynamic_cast<CSVRender::EditMode&> (*mEditMode->getCurrent()).setEditLock (mLocked);
|
|
|
|
|
}
|
|
|
|
|