diff --git a/bluesky/ui/qtgl/gltiledmap.py b/bluesky/ui/qtgl/gltiledmap.py index 3edc8aa308..fef9de04b3 100644 --- a/bluesky/ui/qtgl/gltiledmap.py +++ b/bluesky/ui/qtgl/gltiledmap.py @@ -38,7 +38,7 @@ def create(self): self.offsetzoom_loc = glh.ShaderSet.get_shader( 'tiled').uniformLocation('offset_scale') # Make sure that we have textures on first draw - self.texture.on_panzoom_changed(True) + self.texture.panzoom(finished=True) def draw(self): # Send the (possibly) updated global uniforms to the buffer diff --git a/bluesky/ui/qtgl/tiledtexture.py b/bluesky/ui/qtgl/tiledtexture.py index 98ebe9e854..b7a36f55ab 100644 --- a/bluesky/ui/qtgl/tiledtexture.py +++ b/bluesky/ui/qtgl/tiledtexture.py @@ -18,7 +18,7 @@ from PyQt6.QtGui import QImage, qRgba import bluesky as bs -from bluesky.core import Signal +from bluesky.network import sharedstate as ss from bluesky.ui.qtgl import glhelpers as glh @@ -167,7 +167,7 @@ def __init__(self, glsurface, tilesource='opentopomap'): self.indextexture = glh.Texture(target=glh.Texture.Target.Target2D) self.indexsampler_loc = 0 self.arraysampler_loc = 0 - Signal('state-change.panzoom').connect(self.panzoom) + ss.subscriber(self.panzoom, topic='PANZOOM') def add_bounding_box(self, lat0, lon0, lat1, lon1): ''' Add the bounding box of a textured shape. @@ -249,7 +249,7 @@ def bind(self, unit=0): # Bind tile array texture to texture unit 1 super().bind(4) - def panzoom(self, pzdata, finished=False): + def panzoom(self, pzdata=None, finished=True): ''' Update textures whenever pan/zoom changes. Arguments: