mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 20:06:40 +00:00
referencables also work now
This commit is contained in:
parent
1edf5a4414
commit
5ad572346b
2 changed files with 13 additions and 3 deletions
|
@ -316,8 +316,16 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
|
|
||||||
/// \todo add an user setting to reuse sub views (on a per document basis or on a per top level view basis)
|
/// \todo add an user setting to reuse sub views (on a per document basis or on a per top level view basis)
|
||||||
|
|
||||||
SubView *view = mSubViewFactory.makeSubView (id, *mDocument);
|
const std::vector<CSMWorld::UniversalId::Type> referenceables(CSMWorld::UniversalId::listReferenceableTypes());
|
||||||
|
SubView *view = NULL;
|
||||||
|
if(std::find(referenceables.begin(), referenceables.end(), id.getType()) != referenceables.end())
|
||||||
|
{
|
||||||
|
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
view = mSubViewFactory.makeSubView (id, *mDocument);
|
||||||
|
}
|
||||||
|
assert(view);
|
||||||
if (!hint.empty())
|
if (!hint.empty())
|
||||||
view->useHint (hint);
|
view->useHint (hint);
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,9 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO
|
||||||
{
|
{
|
||||||
return new QTextEdit(parent);
|
return new QTextEdit(parent);
|
||||||
}
|
}
|
||||||
if (display == CSMWorld::ColumnBase::Display_String || display == CSMWorld::ColumnBase::Display_Skill)
|
if (display == CSMWorld::ColumnBase::Display_String ||
|
||||||
|
display == CSMWorld::ColumnBase::Display_Skill ||
|
||||||
|
display == CSMWorld::ColumnBase::Display_Script)
|
||||||
{
|
{
|
||||||
return new QLineEdit(parent);
|
return new QLineEdit(parent);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue