[QGIS Commit] r12360 - trunk/qgis/src/app/legend
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Dec 7 16:19:01 EST 2009
Author: wonder
Date: 2009-12-07 16:19:00 -0500 (Mon, 07 Dec 2009)
New Revision: 12360
Modified:
trunk/qgis/src/app/legend/qgsapplegendinterface.cpp
trunk/qgis/src/app/legend/qgsapplegendinterface.h
Log:
Added missing connection to legend to trigger signals of group moves.
Modified: trunk/qgis/src/app/legend/qgsapplegendinterface.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgsapplegendinterface.cpp 2009-12-07 21:03:45 UTC (rev 12359)
+++ trunk/qgis/src/app/legend/qgsapplegendinterface.cpp 2009-12-07 21:19:00 UTC (rev 12360)
@@ -23,6 +23,7 @@
QgsAppLegendInterface::QgsAppLegendInterface( QgsLegend * legend )
: mLegend( legend )
{
+ connect( legend, SIGNAL( itemMoved( QModelIndex, QModelIndex ) ), this, SLOT( updateIndex( QModelIndex, QModelIndex ) ) );
}
QgsAppLegendInterface::~QgsAppLegendInterface()
@@ -44,7 +45,7 @@
mLegend->moveLayer( ml, groupIndex );
}
-void QgsAppLegendInterface::updateIndex( const QModelIndex &oldIndex, const QModelIndex& newIndex)
+void QgsAppLegendInterface::updateIndex( QModelIndex oldIndex, QModelIndex newIndex )
{
if ( mLegend->isLegendGroup( newIndex ) )
{
Modified: trunk/qgis/src/app/legend/qgsapplegendinterface.h
===================================================================
--- trunk/qgis/src/app/legend/qgsapplegendinterface.h 2009-12-07 21:03:45 UTC (rev 12359)
+++ trunk/qgis/src/app/legend/qgsapplegendinterface.h 2009-12-07 21:19:00 UTC (rev 12360)
@@ -20,7 +20,8 @@
#include "qgslegendinterface.h"
-class QModelIndex;
+#include <QModelIndex>
+
class QgsLegend;
class QgsMapLayer;
@@ -55,7 +56,7 @@
void moveLayer( QgsMapLayer * ml, int groupIndex );
//! Update an index
- void updateIndex( const QModelIndex &oldIndex, const QModelIndex &newIndex );
+ void updateIndex( QModelIndex oldIndex, QModelIndex newIndex );
private:
More information about the QGIS-commit
mailing list