mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-16 16:06:23 -04:00
In OpenMW-CS, when creating a new object, sort the entries in the drop-down menu alphabetically. Also have the menu be tall enough to show all of them at once (without scroll bars).
This commit is contained in:
parent
aef6ec464c
commit
6e6214bc43
@ -22,6 +22,7 @@ CSVWorld::ReferenceableCreator::ReferenceableCreator (CSMWorld::Data& data, QUnd
|
||||
std::vector<CSMWorld::UniversalId::Type> types = CSMWorld::UniversalId::listReferenceableTypes();
|
||||
|
||||
mType = new QComboBox (this);
|
||||
mType->setMaxVisibleItems(20);
|
||||
|
||||
for (std::vector<CSMWorld::UniversalId::Type>::const_iterator iter (types.begin());
|
||||
iter!=types.end(); ++iter)
|
||||
@ -32,6 +33,8 @@ CSVWorld::ReferenceableCreator::ReferenceableCreator (CSMWorld::Data& data, QUnd
|
||||
static_cast<int> (id2.getType()));
|
||||
}
|
||||
|
||||
mType->model()->sort(0);
|
||||
|
||||
insertBeforeButtons (mType, false);
|
||||
|
||||
connect (mType, SIGNAL (currentIndexChanged (int)), this, SLOT (setType (int)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user