Skip to content

Commit

Permalink
Enable per-pixel horizontal scrolling on attribute table
Browse files Browse the repository at this point in the history
Instead of the previous per-cell scrolling mode, which is very
frustrating to work with when you have wide columns (e.g. columns
wider than the the attribute table window)
  • Loading branch information
nyalldawson committed Apr 9, 2020
1 parent d3c4e4d commit 3ad17e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/attributetable/qgsattributetableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ QgsAttributeTableView::QgsAttributeTableView( QWidget *parent )
setSortingEnabled( true ); // At this point no data is in the model yet, so actually nothing is sorted.
horizontalHeader()->setSortIndicatorShown( false ); // So hide the indicator to avoid confusion.

setHorizontalScrollMode( QAbstractItemView::ScrollPerPixel );

verticalHeader()->viewport()->installEventFilter( this );

connect( verticalHeader(), &QHeaderView::sectionPressed, this, [ = ]( int row ) { selectRow( row, true ); } );
Expand Down

0 comments on commit 3ad17e5

Please sign in to comment.