Changeset 11470:164497e2fd9a in orange


Ignore:
Timestamp:
04/23/13 17:24:28 (12 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Check if widget is still a part of the scheme.

File:
1 edited

Legend:

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

    r11465 r11470  
    260260        """ 
    261261        scheme = self.scheme() 
     262 
     263        if widget not in scheme.node_for_widget: 
     264            # The Node/Widget was already removed from the scheme 
     265            return 
     266 
    262267        node = scheme.node_for_widget[widget] 
    263268 
     
    526531        if receiver is self.scheme() and event.type() == QEvent.DeferredDelete: 
    527532            if self.runtime_state() == SignalManager.Processing: 
    528                 log.debug("Deferring a 'DeferredDelete' event for the Scheme " 
    529                           "instance until SignalManager exits the current " 
    530                           "update loop.") 
     533                log.info("Deferring a 'DeferredDelete' event for the Scheme " 
     534                         "instance until SignalManager exits the current " 
     535                         "update loop.") 
    531536                event.setAccepted(False) 
    532537                self.processingFinished.connect(self.scheme().deleteLater) 
     
    538543                # The widget is still being updated. We need to keep it alive, 
    539544                # it will be deleted in `send_to_node`. 
    540                 log.debug("Deferring a DeferredDelete until widget exits " 
    541                           "the 'process_signals_for_widget'.") 
     545                log.info("Deferring a 'DeferredDelete' until widget exits " 
     546                         "the 'process_signals_for_widget'.") 
    542547                event.setAccepted(False) 
    543548                return True 
Note: See TracChangeset for help on using the changeset viewer.