Skip to content

Commit b487dc8

Browse files
committed
Removed unnecessary option QwtPlot.MinimizeMemory
1 parent 706f85c commit b487dc8

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

CHANGELOG

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
= History of changes =
22

3-
== Version ??? ==
3+
== Version 0.1.0 ==
44

5-
First public release.
5+
First public release.
6+
7+
API compatibility issues with Qwt 6.1.2:
8+
* `QwtPlot.MinimizeMemory` option was removed as this option has no sense
9+
in python-qwt (the polyline plotting is not taking more memory than the
10+
array data that is already there).
11+
*

qwt/plot_curve.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class QwtPlotCurve(QwtPlotSeriesItem, QwtSeriesStore):
8585
# enum PaintAttribute
8686
ClipPolygons = 0x01
8787
FilterPoints = 0x02
88-
MinimizeMemory = 0x04
88+
# MinimizeMemory = 0x04 --> not necessary, see CHANGELOG
8989
ImageBuffer = 0x08
9090

9191
def __init__(self, title=None):
@@ -322,16 +322,6 @@ def drawDots(self, painter, xMap, yMap, canvasRect, from_, to):
322322
painter.testRenderHint(QPainter.Antialiasing),
323323
self.renderThreadCount())
324324
painter.drawImage(canvasRect.toAlignedRect(), image)
325-
elif self.__data.paintAttributes & self.MinimizeMemory:
326-
series = self.data()
327-
for i in range(from_, to+1):
328-
sample = series.sample(i)
329-
xi = xMap.transform(sample.x())
330-
yi = yMap.transform(sample.y())
331-
if doAlign:
332-
xi = round(xi)
333-
yi = round(yi)
334-
QwtPainter.drawPoint(painter, QPointF(xi, yi))
335325
else:
336326
if doAlign:
337327
points = mapper.toPoints(xMap, yMap, self.data(), from_, to)

0 commit comments

Comments
 (0)