implemented sorting in project explorer

Wow I can't believe I forgot about the QSortFilterProxyModel
for like 1.5 years straight.
This commit is contained in:
itsmattkc
2021-02-11 23:23:13 +11:00
parent b8de563a6d
commit 155470bec1
3 changed files with 16 additions and 7 deletions
@@ -42,11 +42,14 @@ ProjectExplorerListViewBase::ProjectExplorerListViewBase(QWidget *parent) :
void ProjectExplorerListViewBase::mouseDoubleClickEvent(QMouseEvent *event)
{
// Cache here so if the index becomes invalid after the base call, we still know the truth
bool item_at_location = indexAt(event->pos()).isValid();
// Perform default double click functions
QListView::mouseDoubleClickEvent(event);
// QAbstractItemView already has a doubleClicked() signal, but we emit another here for double clicking empty space
if (!indexAt(event->pos()).isValid()) {
if (!item_at_location) {
emit DoubleClickedEmptyArea();
}
}