A request from slack that it would be nice to have a way to pause drawing updates to the image in the PyDMImageView widget. This PR adds a simple method for doing that, same as is done for pausing plotting updates in BasePlot.
Testing
Verified functionality with an example like this
from os import path
from pydm import Display
from qtpy.QtWidgets import QVBoxLayout, QPushButton
class ImageExample(Display):
def __init__(self):
super().__init__()
self.my_layout = QVBoxLayout(self)
self.button = QPushButton()
self.button.clicked.connect(self.ui.PyDMImageView.toggleRedraw)
self.my_layout.addWidget(self.button)
def ui_filename(self):
return 'image.ui'
def ui_filepath(self):
return path.join(path.dirname(path.realpath(__file__)), self.ui_filename())
Context
A request from slack that it would be nice to have a way to pause drawing updates to the image in the
PyDMImageView
widget. This PR adds a simple method for doing that, same as is done for pausing plotting updates inBasePlot
.Testing
Verified functionality with an example like this