Skip to content

Commit

Permalink
Ensure layer legend graphics are horizontally scrollable (fixes #28050)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Jun 14, 2019
1 parent 334103d commit a79f2ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/layertree/qgslayertreeview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <QMenu>
#include <QContextMenuEvent>
#include <QHeaderView>

#include "qgslayertreeviewindicator.h"
#include "qgslayertreeviewitemdelegate.h"
Expand All @@ -43,6 +44,10 @@ QgsLayerTreeView::QgsLayerTreeView( QWidget *parent )
setEditTriggers( EditKeyPressed );
setExpandsOnDoubleClick( false ); // normally used for other actions

// Ensure legend graphics are scrollable
header()->setStretchLastSection( false );
header()->setSectionResizeMode( QHeaderView::ResizeToContents );

setSelectionMode( ExtendedSelection );
setDefaultDropAction( Qt::MoveAction );

Expand Down

0 comments on commit a79f2ba

Please sign in to comment.