Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use painter passed by renderComplete
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4844 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 14, 2006
1 parent 1a6c273 commit 4d93383
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/plugins/grass/qgsgrassedit.cpp
Expand Up @@ -1905,26 +1905,22 @@ void QgsGrassEdit::postRender(QPainter *painter)
std::cerr << "QgsGrassEdit::postRender" << std::endl;
#endif

displayMap();
displayMap(painter);

// Redisplay highlighted
if ( mSelectedLine ) {
displayElement ( mSelectedLine, mSymb[SYMB_HIGHLIGHT], mSize );
}
}

void QgsGrassEdit::displayMap (void)
void QgsGrassEdit::displayMap (QPainter *painter)
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::displayMap" << std::endl;
#endif

mTransform = mCanvas->getCoordinateTransform();


QPainter *painter = new QPainter();
painter->begin ( mPixmap );

// Display lines
int nlines = mProvider->numLines();

Expand All @@ -1947,8 +1943,6 @@ void QgsGrassEdit::displayMap (void)
}
}

painter->end();

mCanvas->repaint(false);
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qgsgrassedit.h
Expand Up @@ -207,7 +207,7 @@ public slots:
int mSize;

//! Display all lines and nodes
void displayMap (void);
void displayMap (QPainter *painter);

/**
* Display icon
Expand Down

0 comments on commit 4d93383

Please sign in to comment.