Commits

Aleš Erjavec  committed 41a3f53

Initialize the tracked processing state property.

  • Participants
  • Parent commits 9efc9d8

Comments (0)

Files changed (2)

File Orange/OrangeCanvas/scheme/widgetsscheme.py

             # A widget can already enter blocking state in __init__
             self.__widget_processing_state[widget] |= self.BlockingUpdate
 
+        if widget.processingState != 0:
+            # It can also start processing (initialization of resources, ...)
+            self.__widget_processing_state[widget] |= self.ProcessingUpdate
+            node.set_processing_state(1)
+
         # Install a help shortcut on the widget
         help_shortcut = QShortcut(QKeySequence("F1"), widget)
         help_shortcut.activated.connect(self.__on_help_request)

File Orange/OrangeWidgets/OWBaseWidget.py

         fget=progressBarValue
     )
 
+    processingState = pyqtProperty(int, fget=lambda self: self.__progressState)
+
     def progressBarAdvance(self, value, processEventsFlags=QEventLoop.AllEvents):
         self.progressBarSet(self.progressBarValue + value, processEventsFlags)