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.scale(r.width(), r.height())
|
||||||
self.rbScaleBox.show()
|
self.rbScaleBox.show()
|
||||||
|
|
||||||
def showAxRect(self, ax):
|
def showAxRect(self, ax, **kwargs):
|
||||||
self.setRange(ax.normalized()) # be sure w, h are correct coordinates
|
"""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'])
|
self.sigRangeChangedManually.emit(self.state['mouseEnabled'])
|
||||||
|
|
||||||
def allChildren(self, item=None):
|
def allChildren(self, item=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user