Skip to content

Commit f67a77e

Browse files
author
Pierre Raybaut
committed
Optimization/QwtPlot.updateAxes: do not update scale widget border dist systematically
(is it really a good idea? left a #TODO just in case it isn't...)
1 parent 420109c commit f67a77e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

qwt/qwt_plot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,11 @@ def updateAxes(self):
447447
d.isValid = True
448448
scaleWidget = self.axisWidget(axisId)
449449
scaleWidget.setScaleDiv(d.scaleDiv)
450-
startDist, endDist = scaleWidget.getBorderDistHint()
451-
scaleWidget.setBorderDist(startDist, endDist)
450+
451+
#TODO: see when it is *really* necessary to update border dist
452+
# startDist, endDist = scaleWidget.getBorderDistHint()
453+
# scaleWidget.setBorderDist(startDist, endDist)
454+
452455
for item in itmList:
453456
if item.testItemInterest(QwtPlotItem.ScaleInterest):
454457
item.updateScaleDiv(self.axisScaleDiv(item.xAxis()),

qwt/qwt_scale_div.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ def __eq__(self, other):
6969
if self.__lowerBound != other.__lowerBound or\
7070
self.__upperBound != other.__upperBound:
7171
return False
72-
for index in range(self.NTickTypes):
73-
if self.__ticks[index] != other.__ticks[index]:
74-
return False
75-
return True
72+
return self.__ticks == other.__ticks
7673

7774
def __ne__(self, other):
7875
return not self.__eq__(other)

0 commit comments

Comments
 (0)