mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 19:36:40 +00:00
Move mapToSource back to constructor
This commit is contained in:
parent
11ec96e1e7
commit
0cfabd6f3b
1 changed files with 3 additions and 4 deletions
|
@ -189,10 +189,6 @@ void CSMWorld::TouchLandCommand::onUndo()
|
|||
CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelIndex& index,
|
||||
const QVariant& new_, QUndoCommand* parent)
|
||||
: QUndoCommand (parent), mModel (&model), mIndex (index), mNew (new_), mHasRecordState(false), mOldRecordState(CSMWorld::RecordBase::State_BaseOnly)
|
||||
{
|
||||
}
|
||||
|
||||
void CSMWorld::ModifyCommand::redo()
|
||||
{
|
||||
if (QAbstractProxyModel *proxy = dynamic_cast<QAbstractProxyModel *> (mModel))
|
||||
{
|
||||
|
@ -200,7 +196,10 @@ void CSMWorld::ModifyCommand::redo()
|
|||
mIndex = proxy->mapToSource (mIndex);
|
||||
mModel = proxy->sourceModel();
|
||||
}
|
||||
}
|
||||
|
||||
void CSMWorld::ModifyCommand::redo()
|
||||
{
|
||||
if (mIndex.parent().isValid())
|
||||
{
|
||||
CSMWorld::IdTree* tree = &dynamic_cast<CSMWorld::IdTree&>(*mModel);
|
||||
|
|
Loading…
Reference in a new issue