Changeset 11467:6b291596554f in orange


Ignore:
Timestamp:
04/22/13 16:48:05 (12 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Update only a single pending node in the 'UpdateRequest' event.

Schedule annother update if there are more pending nodes on the queue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/scheme/signalmanager.py

    r11466 r11467  
    431431        if event.type() == QEvent.UpdateRequest: 
    432432            if not self.__state == SignalManager.Running: 
    433                 log.debug("Received UpdateRequest event while not " 
     433                log.debug("Received 'UpdateRequest' event while not " 
    434434                          "in 'Running' state") 
    435435                event.setAccepted(False) 
     
    437437 
    438438            if self.__runtime_state == SignalManager.Processing: 
    439                 log.debug("received UpdateRequest event while in " 
     439                log.debug("Received 'UpdateRequest' event while in " 
    440440                          "'process_queued'") 
    441441                # This happens if someone calls QCoreApplication.processEvents 
     
    445445                return True 
    446446 
    447             log.debug("UpdateRequest event, queued signals: %i", 
     447            log.info("'UpdateRequest' event, queued signals: %i", 
    448448                      len(self._input_queue)) 
    449449            if self._input_queue: 
    450                 self.process_queued() 
     450                self.process_queued(max_nodes=1) 
    451451            event.accept() 
    452452 
    453453            if self.__reschedule: 
    454                 log.debug("Rescheduling UpdateRequest event") 
     454                log.debug("Rescheduling 'UpdateRequest' event") 
    455455                self._update() 
    456456                self.__reschedule = False 
     457            elif self.node_update_front(): 
     458                log.debug("More nodes are eligible for an update. " 
     459                          "Scheduling another update.") 
     460                self._update() 
    457461 
    458462            return True 
Note: See TracChangeset for help on using the changeset viewer.