Skip to content

Commit

Permalink
fix #3859
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 1, 2011
1 parent 2516c38 commit 445ef93
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/plugins/grass/qgsgrassedit.cpp
Expand Up @@ -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;

Expand All @@ -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 );

Expand Down
7 changes: 7 additions & 0 deletions src/plugins/grass/qgsgrassplugin.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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 ) ) );
Expand Down
1 change: 1 addition & 0 deletions src/plugins/grass/qgsgrassplugin.h
Expand Up @@ -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;
Expand Down

0 comments on commit 445ef93

Please sign in to comment.