Skip to content
Permalink
Browse files

fix #3859

  • Loading branch information
jef-n committed Jun 1, 2011
1 parent 2516c38 commit 445ef93be803df72f898bb6e0e2953374ad7ae1a
Showing with 10 additions and 5 deletions.
  1. +2 −5 src/plugins/grass/qgsgrassedit.cpp
  2. +7 −0 src/plugins/grass/qgsgrassplugin.cpp
  3. +1 −0 src/plugins/grass/qgsgrassplugin.h
@@ -1780,9 +1780,8 @@ void QgsGrassEdit::displayDynamic( struct line_pnts *Points, double x, double y,

void QgsGrassEdit::displayNode( int node, const QPen & pen, int size, QPainter *painter )
{
QgsDebugMsg( QString( "node = %1" ).arg( node ) );

if ( !mSymbDisplay[mNodeSymb[node]] ) return;
if ( !mSymbDisplay[mNodeSymb[node]] )
return;

double x, y;

@@ -1805,8 +1804,6 @@ QgsPoint QgsGrassEdit::transformLayerToMap( QgsPoint point )
void QgsGrassEdit::displayIcon( double x, double y, const QPen & pen,
int type, int size, QPainter *painter )
{
QgsDebugMsg( "entered." );

QgsPoint point;
QPolygon pointArray( 2 );

@@ -452,6 +452,7 @@ void QgsGrassPlugin::edit()
mCanvas->refresh();
connect( mEdit, SIGNAL( finished() ), this, SLOT( setEditAction() ) );
connect( mEdit, SIGNAL( finished() ), this, SLOT( cleanUp() ) );
connect( mEdit, SIGNAL( destroyed() ), this, SLOT( editClosed() ) );
connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( closeEdit( QString ) ) );
}
else
@@ -486,6 +487,12 @@ void QgsGrassPlugin::closeEdit( QString layerId )
}
}

void QgsGrassPlugin::editClosed()
{
if( mEdit == sender() )
mEdit = 0;
}

void QgsGrassPlugin::cleanUp()
{
disconnect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( closeEdit( QString ) ) );
@@ -129,6 +129,7 @@ class QgsGrassPlugin: public QObject, public QgisPlugin
//! update plugin icons when the app tells us its theme is changed
void setCurrentTheme( QString theThemeName );
void setTransform();
void editClosed();
private:
//! Name of the plugin
QString pluginNameQString;

0 comments on commit 445ef93

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