Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove Mac conditional code. As of Qt 4.1.3, Q3CanvasView is behaving…
… the same on both Mac and X11.

git-svn-id: http://svn.osgeo.org/qgis/trunk@5508 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Jun 7, 2006
1 parent fc5ee8d commit 15dc800
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
18 changes: 0 additions & 18 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -260,26 +260,9 @@ QgsMapLayer* QgsMapCanvas::currentLayer()
void QgsMapCanvas::refresh()
{
clear();
#ifdef Q_WS_MACX
if (mDirty)
{
render();
}
#endif

updateContents();
} // refresh

#ifdef Q_WS_MACX
void QgsMapCanvas::paintEvent(QPaintEvent * ev)
{
int cx, cy, cw, ch;
ev->rect().getRect(&cx, &cy, &cw, &ch);
QPainter p(this);
drawContents(&p, cx, cy, cw, ch);
}
#else

void QgsMapCanvas::drawContents(QPainter * p, int cx, int cy, int cw, int ch)
{
#ifdef QGISDEBUG
Expand All @@ -298,7 +281,6 @@ void QgsMapCanvas::drawContents(QPainter * p, int cx, int cy, int cw, int ch)

Q3CanvasView::drawContents(p, cx, cy, cw, ch);
}
#endif

void QgsMapCanvas::render()
{
Expand Down
5 changes: 0 additions & 5 deletions src/gui/qgsmapcanvas.h
Expand Up @@ -326,13 +326,8 @@ class QgsMapCanvas : public Q3CanvasView
//! Overridden resize event
void resizeEvent(QResizeEvent * e);

#ifdef Q_WS_MACX
//! Overridden paint event
void paintEvent(QPaintEvent * ev);
#else
//! Overridden draw contents from canvas view
void drawContents(QPainter * p, int cx, int cy, int cw, int ch);
#endif

//! Zooms to a given center and scale
void zoomByScale(int x, int y, double scaleFactor);
Expand Down

0 comments on commit 15dc800

Please sign in to comment.