mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Change default topic info values
This commit is contained in:
parent
f4110a72cc
commit
a8576d78ad
1 changed files with 12 additions and 6 deletions
|
@ -32,13 +32,19 @@ std::string CSVWorld::InfoCreator::getId() const
|
||||||
|
|
||||||
void CSVWorld::InfoCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const
|
void CSVWorld::InfoCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const
|
||||||
{
|
{
|
||||||
int index =
|
CSMWorld::IdTable& table = dynamic_cast<CSMWorld::IdTable&> (*getData().getTableModel (getCollectionId()));
|
||||||
dynamic_cast<CSMWorld::IdTable&> (*getData().getTableModel (getCollectionId())).
|
|
||||||
findColumnIndex (
|
|
||||||
getCollectionId().getType()==CSMWorld::UniversalId::Type_TopicInfos ?
|
|
||||||
CSMWorld::Columns::ColumnId_Topic : CSMWorld::Columns::ColumnId_Journal);
|
|
||||||
|
|
||||||
command.addValue (index, mTopic->text());
|
if (getCollectionId() == CSMWorld::UniversalId::Type_TopicInfos)
|
||||||
|
{
|
||||||
|
command.addValue (table.findColumnIndex(CSMWorld::Columns::ColumnId_Topic), mTopic->text());
|
||||||
|
command.addValue (table.findColumnIndex(CSMWorld::Columns::ColumnId_Rank), -1);
|
||||||
|
command.addValue (table.findColumnIndex(CSMWorld::Columns::ColumnId_Gender), -1);
|
||||||
|
command.addValue (table.findColumnIndex(CSMWorld::Columns::ColumnId_PcRank), -1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
command.addValue (table.findColumnIndex(CSMWorld::Columns::ColumnId_Journal), mTopic->text());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CSVWorld::InfoCreator::InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack,
|
CSVWorld::InfoCreator::InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack,
|
||||||
|
|
Loading…
Reference in a new issue