Skip to content

Call GraphicsItem.viewTransformChanged()#1413

Merged
j9ac9k merged 2 commits intopyqtgraph:masterfrom
j9ac9k:fix-infiniteline-cache
Oct 22, 2020
Merged

Call GraphicsItem.viewTransformChanged()#1413
j9ac9k merged 2 commits intopyqtgraph:masterfrom
j9ac9k:fix-infiniteline-cache

Conversation

@j9ac9k
Copy link
Copy Markdown
Member

@j9ac9k j9ac9k commented Oct 22, 2020

Follow up to #1391 got a bug report on slack about infinite lines not extending the height of the view; this was due to some cache handling in GraphicsItem; fix was just to call the inherited viewTransformChanged method from GraphicsItem for InifiniteLine.

I'm wondering if we should take a look at some of the other places we call out viewTransformChanged explicitly.

Other places we call it include:

  • ImageItem.py
  • PlotCurveItem.py
  • ROI.py
  • ScatterPlotItem.py
  • TextItem.py
  • TargetItem.py (not currently used much)

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Oct 22, 2020

did a quick run through of these, the infinite line labels did not behave as intended, so I made the call to the GraphicsItem method from there too... I think this should do it...

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Oct 22, 2020

Fixes #1412

@j9ac9k j9ac9k merged commit 27ca174 into pyqtgraph:master Oct 22, 2020
ev.acceptDrags(QtCore.Qt.LeftButton)

def viewTransformChanged(self):
GraphicsItem.viewTransformChanged(self)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not look into the code (example), but normally the TextItem.viewTransformChanged should do the job. Did you check if the order is important?

@j9ac9k j9ac9k deleted the fix-infiniteline-cache branch February 1, 2021 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants