Skip to content
Permalink
Browse files

Turn on scrolling in legend layers

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11237 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann
homann committed Aug 1, 2009
1 parent 4d3831f commit 7c3f1c659ae7536d4eed972a97c7a7b833f546d0
Showing with 11 additions and 0 deletions.
  1. +8 −0 src/app/legend/qgslegend.cpp
  2. +3 −0 src/app/legend/qgslegend.h
@@ -249,6 +249,8 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
QTreeWidgetItem* item = itemAt( p );

hideLine();
updateLineWidget();
scrollToItem (item );

QgsLegendItem* origin = dynamic_cast<QgsLegendItem*>( mItemBeingMoved );
QgsLegendItem* dest = dynamic_cast<QgsLegendItem*>( item );
@@ -1992,6 +1994,12 @@ void QgsLegend::showLine(int y, int left)
mInsertionLine->setGeometry(left, y, viewport()->width(), 2);
}

void QgsLegend::updateLineWidget()
{
mInsertionLine->repaint();
}


QTreeWidgetItem * QgsLegend::lastVisibleItem()
{
QTreeWidgetItem *current;
@@ -319,6 +319,9 @@ class QgsLegend : public QTreeWidget
/** Show the line that indicates insertion position */
void showLine(int y, int left);

/** Update the widget with latest changes immediately */
void updateLineWidget();

/** Returns the last visible item in the tree widget */
QTreeWidgetItem *lastVisibleItem();

0 comments on commit 7c3f1c6

Please sign in to comment.
You can’t perform that action at this time.