Merge pull request #1173 from 2xB/fix-1136-2

GraphicsLayout: Always call layout.activate() after adding items
This commit is contained in:
Ogi Moore 2020-05-30 13:04:37 -07:00 committed by GitHub
commit 2ac1eefeb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,6 +134,9 @@ class GraphicsLayout(GraphicsWidget):
item.geometryChanged.connect(self._updateItemBorder)
self.layout.addItem(item, row, col, rowspan, colspan)
self.layout.activate() # Update layout, recalculating bounds.
# Allows some PyQtGraph features to also work without Qt event loop.
self.nextColumn()
def getItem(self, row, col):