Editor: Fix labels for creator user inputs

pull/191/head^2
Rob Cutmore 8 years ago
parent 8d4441bb5e
commit 77bf1efc1a

@ -45,16 +45,20 @@ CSVWorld::InfoCreator::InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack,
const CSMWorld::UniversalId& id, CSMWorld::IdCompletionManager& completionManager)
: GenericCreator (data, undoStack, id)
{
QLabel *label = new QLabel ("Topic", this);
insertBeforeButtons (label, false);
// Add topic/journal ID input with auto-completion.
// Only existing topic/journal IDs are accepted so no ID validation is performed.
// Determine if we're dealing with topics or journals.
CSMWorld::ColumnBase::Display displayType = CSMWorld::ColumnBase::Display_Topic;
QString labelText = "Topic";
if (getCollectionId().getType() == CSMWorld::UniversalId::Type_JournalInfos)
{
displayType = CSMWorld::ColumnBase::Display_Journal;
labelText = "Journal";
}
QLabel *label = new QLabel (labelText, this);
insertBeforeButtons (label, false);
// Add topic/journal ID input with auto-completion.
// Only existing topic/journal IDs are accepted so no ID validation is performed.
mTopic = new CSVWidget::DropLineEdit(displayType, this);
mTopic->setCompleter(completionManager.getCompleter(displayType).get());
insertBeforeButtons (mTopic, true);

@ -32,7 +32,7 @@ CSVWorld::PathgridCreator::PathgridCreator(
{
setManualEditing(false);
QLabel *label = new QLabel("Cell ID", this);
QLabel *label = new QLabel("Cell", this);
insertBeforeButtons(label, false);
// Add cell ID input with auto-completion.

@ -34,7 +34,7 @@ CSVWorld::StartScriptCreator::StartScriptCreator(
setManualEditing(false);
// Add script ID input label.
QLabel *label = new QLabel("Script ID", this);
QLabel *label = new QLabel("Script", this);
insertBeforeButtons(label, false);
// Add script ID input with auto-completion.

Loading…
Cancel
Save