Skip to content
Permalink
Browse files

Added missing connection to legend to trigger signals of group moves.

git-svn-id: http://svn.osgeo.org/qgis/trunk@12360 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 7, 2009
1 parent 94317ce commit ceb9e5e279a95c56292a202ccd931ccd21a8be38
Showing with 5 additions and 3 deletions.
  1. +2 −1 src/app/legend/qgsapplegendinterface.cpp
  2. +3 −2 src/app/legend/qgsapplegendinterface.h
@@ -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 @@ void QgsAppLegendInterface::moveLayer( QgsMapLayer * ml, int groupIndex )
mLegend->moveLayer( ml, groupIndex );
}

void QgsAppLegendInterface::updateIndex( const QModelIndex &oldIndex, const QModelIndex& newIndex)
void QgsAppLegendInterface::updateIndex( QModelIndex oldIndex, QModelIndex newIndex )
{
if ( mLegend->isLegendGroup( newIndex ) )
{
@@ -20,7 +20,8 @@

#include "qgslegendinterface.h"

class QModelIndex;
#include <QModelIndex>

class QgsLegend;
class QgsMapLayer;

@@ -55,7 +56,7 @@ class QgsAppLegendInterface : public QgsLegendInterface
void moveLayer( QgsMapLayer * ml, int groupIndex );

//! Update an index
void updateIndex( const QModelIndex &oldIndex, const QModelIndex &newIndex );
void updateIndex( QModelIndex oldIndex, QModelIndex newIndex );

private:

0 comments on commit ceb9e5e

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