ui: fixes

* fixed first match in autocompletion not preselected
* fixed maximize file button extending snippets
* changed names of views and setting name of composite view
* fixed number of error locations
This commit is contained in:
Eberhard Graether
2015-09-10 15:49:28 +02:00
parent 4c0d749a39
commit eaa3fab4ec
13 changed files with 22 additions and 20 deletions
+2 -4
View File
@@ -205,6 +205,8 @@ void QtAutocompletionList::completeAt(const QPoint& pos, const std::vector<Searc
return;
}
setCompletionPrefix("");
const QModelIndex& index = completionModel()->index(0, 0);
list->setCurrentIndex(index);
@@ -212,16 +214,12 @@ void QtAutocompletionList::completeAt(const QPoint& pos, const std::vector<Searc
minSize.setHeight(std::min(minSize.height(), m_model->rowCount(index) * rect.height() + 16));
list->setMinimumSize(minSize);
list->verticalScrollBar()->setValue(list->verticalScrollBar()->minimum());
list->setCurrentIndex(index); // must be set again to avoid flickering
disconnect(); // must be done because of a bug where signals are no longer received by QtSmartSearchBox
connect(this, SIGNAL(highlighted(const QModelIndex&)), this, SLOT(onHighlighted(const QModelIndex&)), Qt::DirectConnection);
connect(this, SIGNAL(activated(const QModelIndex&)), this, SLOT(onActivated(const QModelIndex&)), Qt::DirectConnection);
setCompletionPrefix("");
QWidget* textBox = dynamic_cast<QWidget*>(parent());
complete(QRect(pos.x(), pos.y(), textBox->width(), 1));
}