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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user