Skip to content

Commit 15dc800

Browse files
author
telwertowski
committed
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
1 parent fc5ee8d commit 15dc800

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/gui/qgsmapcanvas.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -260,26 +260,9 @@ QgsMapLayer* QgsMapCanvas::currentLayer()
260260
void QgsMapCanvas::refresh()
261261
{
262262
clear();
263-
#ifdef Q_WS_MACX
264-
if (mDirty)
265-
{
266-
render();
267-
}
268-
#endif
269-
270263
updateContents();
271264
} // refresh
272265

273-
#ifdef Q_WS_MACX
274-
void QgsMapCanvas::paintEvent(QPaintEvent * ev)
275-
{
276-
int cx, cy, cw, ch;
277-
ev->rect().getRect(&cx, &cy, &cw, &ch);
278-
QPainter p(this);
279-
drawContents(&p, cx, cy, cw, ch);
280-
}
281-
#else
282-
283266
void QgsMapCanvas::drawContents(QPainter * p, int cx, int cy, int cw, int ch)
284267
{
285268
#ifdef QGISDEBUG
@@ -298,7 +281,6 @@ void QgsMapCanvas::drawContents(QPainter * p, int cx, int cy, int cw, int ch)
298281

299282
Q3CanvasView::drawContents(p, cx, cy, cw, ch);
300283
}
301-
#endif
302284

303285
void QgsMapCanvas::render()
304286
{

src/gui/qgsmapcanvas.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,8 @@ class QgsMapCanvas : public Q3CanvasView
326326
//! Overridden resize event
327327
void resizeEvent(QResizeEvent * e);
328328

329-
#ifdef Q_WS_MACX
330-
//! Overridden paint event
331-
void paintEvent(QPaintEvent * ev);
332-
#else
333329
//! Overridden draw contents from canvas view
334330
void drawContents(QPainter * p, int cx, int cy, int cw, int ch);
335-
#endif
336331

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

0 commit comments

Comments
 (0)