Going further: waiting for a user validation#
In this chapter we will:
avoid downstream propagation until a ‘ok’ button is pressed
add a ‘ok’ button which trigger downstrean processing with the current result
Avoid downstream propagation#
To avoid downstream processing we can replace ewoks execution calls from execute_ewoks_task to execute_ewoks_task_without_propagation.
We also need to reimplement the handleNewSignals function that will call by default the execute_ewoks_task instead of execute_ewoks_task_without_propagation
class OWClipData(
OWEwoksWidgetOneThread,
ewokstaskclass=ClipDataTask,
):
...
def _percentileChanged(self):
self.set_dynamic_input("percentiles", self._myWidget.getPercentiles())
data = self.get_task_output_value("data")
if not is_missing_data(data):
self.execute_ewoks_task_without_propagation()
def handleNewSignals(self):
self.execute_ewoks_task_without_propagation()