mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-11 00:39:59 +00:00
register extra views. do not display id
This commit is contained in:
parent
1f1774b5e1
commit
0447be7e7a
@ -192,7 +192,9 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, CSM
|
||||
|
||||
if (flags & CSMWorld::ColumnBase::Flag_Dialogue)
|
||||
{
|
||||
layout->addWidget (new QLabel (model->headerData (i, Qt::Horizontal).toString()), i, 0);
|
||||
if(i) //the first run adds the pointless id field
|
||||
{
|
||||
layout->addWidget (new QLabel (model->headerData (i, Qt::Horizontal).toString()), i-1, 0);
|
||||
|
||||
CSMWorld::ColumnBase::Display display = static_cast<CSMWorld::ColumnBase::Display>
|
||||
(model->headerData (i, Qt::Horizontal, CSMWorld::ColumnBase::Role_Display).toInt());
|
||||
@ -202,13 +204,14 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, CSM
|
||||
|
||||
if (widget)
|
||||
{
|
||||
layout->addWidget (widget, i, 1);
|
||||
layout->addWidget (widget, i-1, 1);
|
||||
mWidgetMapper->addMapping (widget, i);
|
||||
if (! (model->flags (model->index (0, i)) & Qt::ItemIsEditable))
|
||||
{
|
||||
widget->setDisabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,4 +81,12 @@ void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
||||
|
||||
manager.add(CSMWorld::UniversalId::Type_Region, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Spell, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Referenceable, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Birthsign, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Global, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Gmst, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Race, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Class, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Topic, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
manager.add(CSMWorld::UniversalId::Type_Reference, new CSVDoc::SubViewFactory<DialogueSubView>);
|
||||
}
|
Loading…
Reference in New Issue
Block a user