Skip to content

Commit

Permalink
enable/disable edit according to selected layer
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5114 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Mar 29, 2006
1 parent e77c7cc commit 3c4a1c1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/plugins/grass/qgsgrassplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// includes
#include "qgisapp.h"
#include "qgsmaplayer.h"
#include "qgslegend.h"
#include "qgisiface.h"
#include "qgsmapcanvas.h"
#include "qgsmaplayer.h"
Expand Down Expand Up @@ -222,8 +223,11 @@ void QgsGrassPlugin::initGui()
// Connect display region
connect( mCanvas, SIGNAL(renderComplete(QPainter *)), this, SLOT(postRender(QPainter *)));


connect ( mCanvas, SIGNAL(layersChanged()), this, SLOT(setEditAction()) );
setEditAction();
//connect ( qGisInterface, SIGNAL(currentLayerChanged(QgsMapLayer *)),
// this, SLOT(setEditAction()) );
connect ( mQgis->legend(), SIGNAL(currentLayerChanged(QgsMapLayer *)),
this, SLOT(setEditAction()) );

// Init Region symbology
mRegionPen.setColor( QColor ( settings.readEntry ("/GRASS/region/color", "#ff0000" ) ) );
Expand Down Expand Up @@ -468,9 +472,6 @@ void QgsGrassPlugin::setEditAction()
{
mEditAction->setEnabled(false);
}

// TODO connect to currentItemChanged()? and disable this:
mEditAction->setEnabled(true);
}

void QgsGrassPlugin::newVector()
Expand Down

0 comments on commit 3c4a1c1

Please sign in to comment.