Skip to content
Permalink
Browse files

fix #3859

  • Loading branch information
jef-n committed Jun 1, 2011
1 parent df8bd2d commit edad445fbbc663549d31c55413c2470691c37944
@@ -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;

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

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

0 comments on commit edad445

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