Skip to content
Permalink
Browse files

[GRASS] keep layer specific suppress form mode

  • Loading branch information
blazek committed Oct 14, 2015
1 parent d896c01 commit 9fe1b655e1bd2a2281258067954cb3deb3de75b6
Showing with 5 additions and 2 deletions.
  1. +2 −1 src/plugins/grass/qgsgrassplugin.cpp
  2. +3 −1 src/plugins/grass/qgsgrassplugin.h
@@ -394,6 +394,7 @@ void QgsGrassPlugin::onEditingStarted()
QgsGrassEditRenderer *renderer = new QgsGrassEditRenderer();

mOldStyles[vectorLayer] = vectorLayer->styleManager()->currentStyle();
mFormSuppress[vectorLayer] = vectorLayer->featureFormSuppress();

// Because the edit style may be stored to project:
// - do not translate because it may be loaded in QGIS running with different language
@@ -483,7 +484,7 @@ void QgsGrassPlugin::addFeature()
QgsDebugMsg( "grassProvider is null" );
return;
}
QgsVectorLayer::FeatureFormSuppress formSuppress = QgsVectorLayer::SuppressDefault;
QgsVectorLayer::FeatureFormSuppress formSuppress = mFormSuppress.value( vectorLayer );
if ( sender() == mAddPointAction )
{
qGisInterface->mapCanvas()->setMapTool( mAddPoint );
@@ -18,6 +18,7 @@
#include "../qgisplugin.h"
#include "qgscoordinatereferencesystem.h"
#include "qgscoordinatetransform.h"
#include "qgsvectorlayer.h"
#include <QObject>

class QgsGrassTools;
@@ -28,7 +29,6 @@ class QgsMapCanvas;
class QgsMapLayer;
class QgsMapTool;
class QgsRubberBand;
class QgsVectorLayer;

class QAction;
class QIcon;
@@ -175,6 +175,8 @@ class QgsGrassPlugin : public QObject, public QgisPlugin

// Names of layer styles before editing started
QMap<QgsVectorLayer *, QString> mOldStyles;
// Original layer form suppress
QMap<QgsVectorLayer *, QgsVectorLayer::FeatureFormSuppress> mFormSuppress;
};

#endif // QGSGRASSPLUGIN_H

0 comments on commit 9fe1b65

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