mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 17:19:56 +00:00
Close the creator when the original record is removed (in clone mode)
This commit is contained in:
parent
3a6f708405
commit
9ef3dced90
2 changed files with 13 additions and 0 deletions
|
@ -161,6 +161,8 @@ CSVWorld::GenericCreator::GenericCreator (CSMWorld::Data& data, QUndoStack& undo
|
||||||
connect (mCreate, SIGNAL (clicked (bool)), this, SLOT (create()));
|
connect (mCreate, SIGNAL (clicked (bool)), this, SLOT (create()));
|
||||||
|
|
||||||
connect (mId, SIGNAL (textChanged (const QString&)), this, SLOT (textChanged (const QString&)));
|
connect (mId, SIGNAL (textChanged (const QString&)), this, SLOT (textChanged (const QString&)));
|
||||||
|
|
||||||
|
connect (&mData, SIGNAL (idListChanged()), this, SLOT (dataIdListChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::GenericCreator::setEditLock (bool locked)
|
void CSVWorld::GenericCreator::setEditLock (bool locked)
|
||||||
|
@ -291,3 +293,12 @@ void CSVWorld::GenericCreator::scopeChanged (int index)
|
||||||
update();
|
update();
|
||||||
updateNamespace();
|
updateNamespace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSVWorld::GenericCreator::dataIdListChanged()
|
||||||
|
{
|
||||||
|
// If the original ID of cloned record was removed, cancel the creator
|
||||||
|
if (mCloneMode && !mData.hasId(mClonedId))
|
||||||
|
{
|
||||||
|
emit done();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -113,6 +113,8 @@ namespace CSVWorld
|
||||||
void create();
|
void create();
|
||||||
|
|
||||||
void scopeChanged (int index);
|
void scopeChanged (int index);
|
||||||
|
|
||||||
|
void dataIdListChanged();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue