diff --git a/.gitignore b/.gitignore index 9750fd85..7b48d224 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +Makefile porymap.pro.user *.autosave *.stash diff --git a/forms/tileseteditor.ui b/forms/tileseteditor.ui index 626351cb..edb0f306 100644 --- a/forms/tileseteditor.ui +++ b/forms/tileseteditor.ui @@ -206,7 +206,7 @@ - + diff --git a/src/ui/noscrollcombobox.cpp b/src/ui/noscrollcombobox.cpp index 723289d9..e244b1ab 100644 --- a/src/ui/noscrollcombobox.cpp +++ b/src/ui/noscrollcombobox.cpp @@ -1,10 +1,21 @@ #include "noscrollcombobox.h" +#include + NoScrollComboBox::NoScrollComboBox(QWidget *parent) : QComboBox(parent) { // Don't let scrolling hijack focus. setFocusPolicy(Qt::StrongFocus); + + // Make speed a priority when loading comboboxes. + setMinimumContentsLength(20);// an arbitrary limit + setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); + + // Allow items to be searched by any part of the word, displaying all matches. + setEditable(true);// can set to false manually when using + this->completer()->setCompletionMode(QCompleter::PopupCompletion); + this->completer()->setFilterMode(Qt::MatchContains); } void NoScrollComboBox::wheelEvent(QWheelEvent *event)