Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[GRASS] keep layer specific suppress form mode
  • Loading branch information
blazek committed Oct 14, 2015
1 parent d896c01 commit 9fe1b65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/plugins/grass/qgsgrassplugin.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/grass/qgsgrassplugin.h
Expand Up @@ -18,6 +18,7 @@
#include "../qgisplugin.h"
#include "qgscoordinatereferencesystem.h"
#include "qgscoordinatetransform.h"
#include "qgsvectorlayer.h"
#include <QObject>

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

class QAction;
class QIcon;
Expand Down Expand Up @@ -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.