mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Enable sorting for Info tables
This commit is contained in:
parent
a6624ca576
commit
c60fed89ac
@ -68,10 +68,10 @@ void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
||||
new CSVDoc::SubViewFactoryWithCreator<TableSubView, JournalCreatorFactory>);
|
||||
|
||||
manager.add (CSMWorld::UniversalId::Type_TopicInfos,
|
||||
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<InfoCreator> > (false));
|
||||
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<InfoCreator> >);
|
||||
|
||||
manager.add (CSMWorld::UniversalId::Type_JournalInfos,
|
||||
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<InfoCreator> > (false));
|
||||
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<InfoCreator> >);
|
||||
|
||||
// Subviews for resources tables
|
||||
manager.add (CSMWorld::UniversalId::Type_Meshes,
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "../../model/world/data.hpp"
|
||||
#include "../../model/world/commands.hpp"
|
||||
#include "../../model/world/infotableproxymodel.hpp"
|
||||
#include "../../model/world/idtableproxymodel.hpp"
|
||||
#include "../../model/world/idtablebase.hpp"
|
||||
#include "../../model/world/idtable.hpp"
|
||||
@ -276,7 +277,16 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
|
||||
|
||||
mModel = &dynamic_cast<CSMWorld::IdTableBase&> (*mDocument.getData().getTableModel (id));
|
||||
|
||||
mProxyModel = new CSMWorld::IdTableProxyModel (this);
|
||||
bool isInfoTable = id.getType() == CSMWorld::UniversalId::Type_TopicInfos ||
|
||||
id.getType() == CSMWorld::UniversalId::Type_JournalInfos;
|
||||
if (isInfoTable)
|
||||
{
|
||||
mProxyModel = new CSMWorld::InfoTableProxyModel(id.getType(), this);
|
||||
}
|
||||
else
|
||||
{
|
||||
mProxyModel = new CSMWorld::IdTableProxyModel (this);
|
||||
}
|
||||
mProxyModel->setSourceModel (mModel);
|
||||
|
||||
mDispatcher = new CSMWorld::CommandDispatcher (document, id, this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user