Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ ListView::ListView(QWidget *parent) : QTreeView(parent)
setMouseTracking(true);//追踪鼠标

m_rubberBand = new QRubberBand(QRubberBand::Shape::Rectangle, this);

//fix head indication sort type and order not change in preference file issue
connect(header(), &QHeaderView::sortIndicatorChanged, this, [=](int logicalIndex, Qt::SortOrder order)
{
//qDebug() << "sortIndicatorChanged:" <<logicalIndex<<order;
Peony::GlobalSettings::getInstance()->setValue(SORT_COLUMN, logicalIndex);
Peony::GlobalSettings::getInstance()->setValue(SORT_ORDER, order);
});
}

void ListView::scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint)
Expand Down