Skip to content

Commit 445ef93

Browse files
committed
fix #3859
1 parent 2516c38 commit 445ef93

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/plugins/grass/qgsgrassedit.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,9 +1780,8 @@ void QgsGrassEdit::displayDynamic( struct line_pnts *Points, double x, double y,
17801780

17811781
void QgsGrassEdit::displayNode( int node, const QPen & pen, int size, QPainter *painter )
17821782
{
1783-
QgsDebugMsg( QString( "node = %1" ).arg( node ) );
1784-
1785-
if ( !mSymbDisplay[mNodeSymb[node]] ) return;
1783+
if ( !mSymbDisplay[mNodeSymb[node]] )
1784+
return;
17861785

17871786
double x, y;
17881787

@@ -1805,8 +1804,6 @@ QgsPoint QgsGrassEdit::transformLayerToMap( QgsPoint point )
18051804
void QgsGrassEdit::displayIcon( double x, double y, const QPen & pen,
18061805
int type, int size, QPainter *painter )
18071806
{
1808-
QgsDebugMsg( "entered." );
1809-
18101807
QgsPoint point;
18111808
QPolygon pointArray( 2 );
18121809

src/plugins/grass/qgsgrassplugin.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ void QgsGrassPlugin::edit()
452452
mCanvas->refresh();
453453
connect( mEdit, SIGNAL( finished() ), this, SLOT( setEditAction() ) );
454454
connect( mEdit, SIGNAL( finished() ), this, SLOT( cleanUp() ) );
455+
connect( mEdit, SIGNAL( destroyed() ), this, SLOT( editClosed() ) );
455456
connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( closeEdit( QString ) ) );
456457
}
457458
else
@@ -486,6 +487,12 @@ void QgsGrassPlugin::closeEdit( QString layerId )
486487
}
487488
}
488489

490+
void QgsGrassPlugin::editClosed()
491+
{
492+
if( mEdit == sender() )
493+
mEdit = 0;
494+
}
495+
489496
void QgsGrassPlugin::cleanUp()
490497
{
491498
disconnect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( closeEdit( QString ) ) );

src/plugins/grass/qgsgrassplugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class QgsGrassPlugin: public QObject, public QgisPlugin
129129
//! update plugin icons when the app tells us its theme is changed
130130
void setCurrentTheme( QString theThemeName );
131131
void setTransform();
132+
void editClosed();
132133
private:
133134
//! Name of the plugin
134135
QString pluginNameQString;

0 commit comments

Comments
 (0)