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 df8bd2d commit edad445
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/plugins/grass/qgsgrassedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1813,8 +1813,6 @@ 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;

Expand All @@ -1840,8 +1838,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
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,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 @@ -488,6 +489,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
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,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 edad445

Please sign in to comment.