Merge remote-tracking branch 'rcutmore/feature-3250'

openmw-39
Marc Zinnschlag 9 years ago
commit eba8b4a518

@ -174,6 +174,7 @@ CSVWorld::GenericCreator::GenericCreator (CSMWorld::Data& data, QUndoStack& undo
connect (mCreate, SIGNAL (clicked (bool)), this, SLOT (create()));
connect (mId, SIGNAL (textChanged (const QString&)), this, SLOT (textChanged (const QString&)));
connect (mId, SIGNAL (returnPressed()), this, SLOT (inputReturnPressed()));
connect (&mData, SIGNAL (idListChanged()), this, SLOT (dataIdListChanged()));
}
@ -209,6 +210,14 @@ void CSVWorld::GenericCreator::textChanged (const QString& text)
update();
}
void CSVWorld::GenericCreator::inputReturnPressed()
{
if (mCreate->isEnabled())
{
create();
}
}
void CSVWorld::GenericCreator::create()
{
if (!mLocked)

@ -116,6 +116,9 @@ namespace CSVWorld
void textChanged (const QString& text);
/// \brief Create record if able to after Return key is pressed on input.
void inputReturnPressed();
void create();
void scopeChanged (int index);

@ -60,6 +60,7 @@ CSVWorld::InfoCreator::InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack,
setManualEditing (false);
connect (mTopic, SIGNAL (textChanged (const QString&)), this, SLOT (topicChanged()));
connect (mTopic, SIGNAL (returnPressed()), this, SLOT (inputReturnPressed()));
}
void CSVWorld::InfoCreator::cloneMode (const std::string& originId,
@ -110,7 +111,7 @@ void CSVWorld::InfoCreator::topicChanged()
update();
}
CSVWorld::Creator *CSVWorld::InfoCreatorFactory::makeCreator(CSMDoc::Document& document,
CSVWorld::Creator *CSVWorld::InfoCreatorFactory::makeCreator(CSMDoc::Document& document,
const CSMWorld::UniversalId& id) const
{
return new InfoCreator(document.getData(),

@ -87,6 +87,7 @@ CSVWorld::ReferenceCreator::ReferenceCreator (CSMWorld::Data& data, QUndoStack&
setManualEditing (false);
connect (mCell, SIGNAL (textChanged (const QString&)), this, SLOT (cellChanged()));
connect (mCell, SIGNAL (returnPressed()), this, SLOT (inputReturnPressed()));
}
void CSVWorld::ReferenceCreator::reset()

@ -53,6 +53,7 @@ CSVWorld::StartScriptCreator::StartScriptCreator(
insertBeforeButtons(mScript, true);
connect(mScript, SIGNAL (textChanged(const QString&)), this, SLOT (scriptChanged()));
connect(mScript, SIGNAL (returnPressed()), this, SLOT (inputReturnPressed()));
}
void CSVWorld::StartScriptCreator::cloneMode(

Loading…
Cancel
Save