|
|
|
@ -21,10 +21,7 @@ CSVWorld::PreviewSubView::PreviewSubView (const CSMWorld::UniversalId& id, CSMDo
|
|
|
|
|
std::string referenceableId =
|
|
|
|
|
document.getData().getReferences().getRecord (id.getId()).get().mRefID;
|
|
|
|
|
|
|
|
|
|
if (referenceableId.empty())
|
|
|
|
|
setWindowTitle ("Preview: Reference to <nothing>");
|
|
|
|
|
else
|
|
|
|
|
setWindowTitle (("Preview: Reference to " + referenceableId).c_str());
|
|
|
|
|
referenceableIdChanged (referenceableId);
|
|
|
|
|
|
|
|
|
|
mScene =
|
|
|
|
|
new CSVRender::PreviewWidget (document.getData(), referenceableId, id.getId(), this);
|
|
|
|
@ -45,6 +42,8 @@ CSVWorld::PreviewSubView::PreviewSubView (const CSMWorld::UniversalId& id, CSMDo
|
|
|
|
|
setWidget (widget);
|
|
|
|
|
|
|
|
|
|
connect (mScene, SIGNAL (closeRequest()), this, SLOT (closeRequest()));
|
|
|
|
|
connect (mScene, SIGNAL (referenceableIdChanged (const std::string&)),
|
|
|
|
|
this, SLOT (referenceableIdChanged (const std::string&)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::PreviewSubView::setEditLock (bool locked) {}
|
|
|
|
@ -52,4 +51,12 @@ void CSVWorld::PreviewSubView::setEditLock (bool locked) {}
|
|
|
|
|
void CSVWorld::PreviewSubView::closeRequest()
|
|
|
|
|
{
|
|
|
|
|
deleteLater();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::PreviewSubView::referenceableIdChanged (const std::string& id)
|
|
|
|
|
{
|
|
|
|
|
if (id.empty())
|
|
|
|
|
setWindowTitle ("Preview: Reference to <nothing>");
|
|
|
|
|
else
|
|
|
|
|
setWindowTitle (("Preview: Reference to " + id).c_str());
|
|
|
|
|
}
|