Pass showAxRect keyword arguments to setRange to allow caller to set padding, etc. (#1145)
Co-authored-by: Luke McNinch <lucas.c.mcninch.civ@mail.mil>
This commit is contained in:
parent
db67a256a9
commit
a5dd549be1
@ -1303,8 +1303,11 @@ class ViewBox(GraphicsWidget):
|
||||
self.rbScaleBox.scale(r.width(), r.height())
|
||||
self.rbScaleBox.show()
|
||||
|
||||
def showAxRect(self, ax):
|
||||
self.setRange(ax.normalized()) # be sure w, h are correct coordinates
|
||||
def showAxRect(self, ax, **kwargs):
|
||||
"""Set the visible range to the given rectangle
|
||||
Passes keyword arguments to setRange
|
||||
"""
|
||||
self.setRange(ax.normalized(), **kwargs) # be sure w, h are correct coordinates
|
||||
self.sigRangeChangedManually.emit(self.state['mouseEnabled'])
|
||||
|
||||
def allChildren(self, item=None):
|
||||
|
Loading…
Reference in New Issue
Block a user