mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Close the creator when the original record is removed (in clone mode)
This commit is contained in:
parent
cad4ce4e0f
commit
cbb124ab4f
@ -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…
x
Reference in New Issue
Block a user