1. biolab
  2. Untitled project
  3. orange

Commits

Aleš Erjavec  committed a34f5c6

Fixed widget progress bar initialization.

  • Participants
  • Parent commits 5fd8d04
  • Branches default

Comments (0)

Files changed (2)

File Orange/OrangeCanvas/scheme/widgetsscheme.py

View file
             # It can also start processing (initialization of resources, ...)
             self.__widget_processing_state[widget] |= self.ProcessingUpdate
             node.set_processing_state(1)
+            node.set_progress(widget.progressBarValue)
 
         # Install a help shortcut on the widget
         help_shortcut = QShortcut(QKeySequence("F1"), widget)

File Orange/OrangeWidgets/OWBaseWidget.py

View file
     """Processing state has changed"""
 
     def progressBarInit(self):
-        self.progressBarValue = 0
         self.startTime = time.time()
         self.setWindowTitle(self.captionTitle + " (0% complete)")
         if self.progressBarHandler:
             self.__progressState = 1
             self.processingStateChanged.emit(1)
 
+        self.progressBarValue = 0
+
     def progressBarSet(self, value, processEventsFlags=QEventLoop.AllEvents):
         """
         Set the current progress bar to `value`. This method will also call