diff --git a/apps/opencs/view/world/genericcreator.cpp b/apps/opencs/view/world/genericcreator.cpp index 7beaf9c67..afa59bc45 100644 --- a/apps/opencs/view/world/genericcreator.cpp +++ b/apps/opencs/view/world/genericcreator.cpp @@ -120,6 +120,13 @@ void CSVWorld::GenericCreator::updateNamespace() } } +void CSVWorld::GenericCreator::addScope (const QString& name, CSMWorld::Scope scope, + const QString& tooltip) +{ + mScope->addItem (name, static_cast (scope)); + mScope->setItemData (mScope->count()-1, tooltip, Qt::ToolTipRole); +} + CSVWorld::GenericCreator::GenericCreator (CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id, bool relaxedIdRules) : mData (data), mUndoStack (undoStack), mListId (id), mLocked (false), mCloneMode (false), @@ -231,13 +238,20 @@ void CSVWorld::GenericCreator::setScope (unsigned int scope) insertAtBeginning (mScope, false); if (mScopes & CSMWorld::Scope_Content) - mScope->addItem ("Content", static_cast (CSMWorld::Scope_Content)); + addScope ("Content", CSMWorld::Scope_Content, + "Record will be stored in the currently edited content file."); if (mScopes & CSMWorld::Scope_Project) - mScope->addItem ("Project", static_cast (CSMWorld::Scope_Project)); + addScope ("Project", CSMWorld::Scope_Project, + "Record will be stored in a local project file.

" + "Record will be created in the reserved namespace \"project\".

" + "Record is available when running OpenMW via OpenCS."); if (mScopes & CSMWorld::Scope_Session) - mScope->addItem ("Session", static_cast (CSMWorld::Scope_Session)); + addScope ("Session", CSMWorld::Scope_Session, + "Record exists only for the duration of the current editing session.

" + "Record will be created in the reserved namespace \"session\".

" + "Record is not available when running OpenMW via OpenCS."); connect (mScope, SIGNAL (currentIndexChanged (int)), this, SLOT (scopeChanged (int))); diff --git a/apps/opencs/view/world/genericcreator.hpp b/apps/opencs/view/world/genericcreator.hpp index 8d9e32966..8c8c34bd8 100644 --- a/apps/opencs/view/world/genericcreator.hpp +++ b/apps/opencs/view/world/genericcreator.hpp @@ -78,6 +78,9 @@ namespace CSVWorld void updateNamespace(); + void addScope (const QString& name, CSMWorld::Scope scope, + const QString& tooltip); + public: GenericCreator (CSMWorld::Data& data, QUndoStack& undoStack,