Skip to content
Permalink
Browse files
disconnect signals, check mValid in postRender, set newpoint on startup
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4921 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 28, 2006
1 parent 63a2c9c commit fc3bfde503cce456b2420cfdee2318d7c585d091
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/plugins/grass/qgsgrassedit.cpp
@@ -454,6 +454,7 @@ void QgsGrassEdit::init()
// TODO: how to get keyboard events from canvas (shortcuts)

mNewPointAction->setOn(true); // Start NEW_POINT tool
startTool(QgsGrassEdit::NEW_POINT);

restorePosition();

@@ -842,6 +843,15 @@ void QgsGrassEdit::closeEdit(void)
std::cerr << "QgsGrassEdit::close()" << std::endl;
#endif

// Disconnect signals
// Warning: it seems that slots (postRender) can be called even
// after disconnect (is it a queue?)
disconnect( this, SLOT(mouseEventReceiverClick(QgsPoint &, Qt::ButtonState)));
disconnect( this, SLOT(mouseEventReceiverMove(QgsPoint &)));
disconnect( this, SLOT(postRender(QPainter *)));

mValid = false; // important for postRender

if ( mAttributes ) {
delete mAttributes;
}
@@ -1908,6 +1918,12 @@ void QgsGrassEdit::postRender(QPainter *painter)
std::cerr << "QgsGrassEdit::postRender" << std::endl;
#endif

// Warning: it seems that this slot can be called even
// after disconnect (is it a queue?)
// -> check mValid

if ( !mValid ) return;

displayMap(painter);

// Redisplay highlighted

0 comments on commit fc3bfde

Please sign in to comment.