1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 18:53:52 +00:00
openmw/apps/opencs/view/world/globalcreator.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
891 B
C++
Raw Normal View History

#include "globalcreator.hpp"
2022-10-19 17:02:00 +00:00
#include <apps/opencs/model/world/columns.hpp>
#include <apps/opencs/model/world/data.hpp>
#include <apps/opencs/view/world/genericcreator.hpp>
#include <components/esm3/variant.hpp>
#include "../../model/world/commands.hpp"
#include "../../model/world/idtable.hpp"
2022-10-19 17:02:00 +00:00
class QUndoStack;
namespace CSVWorld
{
void GlobalCreator::configureCreateCommand(CSMWorld::CreateCommand& command) const
{
CSMWorld::IdTable* table = static_cast<CSMWorld::IdTable*>(getData().getTableModel(getCollectionId()));
int index = table->findColumnIndex(CSMWorld::Columns::ColumnId_ValueType);
int type = (int)ESM::VT_Float;
command.addValue(index, type);
}
GlobalCreator::GlobalCreator(CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id)
: GenericCreator(data, undoStack, id, true)
{
}
}