Skip to content
Permalink
Browse files

enable/disable edit according to selected layer

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5114 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 29, 2006
1 parent 8f011fc commit 7d1010cd2a29bab2fe008769f3caef809eda6eb8
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/plugins/grass/qgsgrassplugin.cpp
@@ -18,6 +18,7 @@
// includes
#include "qgisapp.h"
#include "qgsmaplayer.h"
#include "qgslegend.h"
#include "qgisiface.h"
#include "qgsmapcanvas.h"
#include "qgsmaplayer.h"
@@ -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" ) ) );
@@ -468,9 +472,6 @@ void QgsGrassPlugin::setEditAction()
{
mEditAction->setEnabled(false);
}

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

void QgsGrassPlugin::newVector()

0 comments on commit 7d1010c

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