File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -896,9 +896,14 @@ def updateAxes(self):
896896 scaleWidget = self .axisWidget (axisId )
897897 scaleWidget .setScaleDiv (d .scaleDiv )
898898
899- #TODO: see when it is *really* necessary to update border dist
900- # startDist, endDist = scaleWidget.getBorderDistHint()
901- # scaleWidget.setBorderDist(startDist, endDist)
899+ # It is *really* necessary to update border dist!
900+ # Otherwise, when tick labels are large enough, the ticks
901+ # may not be aligned with canvas grid.
902+ # See the following issues for more details:
903+ # https://github.com/PierreRaybaut/guiqwt/issues/57
904+ # https://github.com/PierreRaybaut/PythonQwt/issues/30
905+ startDist , endDist = scaleWidget .getBorderDistHint ()
906+ scaleWidget .setBorderDist (startDist , endDist )
902907
903908 for item in itmList :
904909 if item .testItemInterest (QwtPlotItem .ScaleInterest ):
You can’t perform that action at this time.
0 commit comments