Changeset 8859:00fe4973edd9 in orange


Ignore:
Timestamp:
08/31/11 12:27:39 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
06eeea3c8a9f261229bd5235b966bb7a80652ef2
Message:

Search for the nearest point only if there is some slot waiting for point_hovered signal.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/plot/owplot.py

    r8735 r8859  
    11331133            b = Qt.MidButton 
    11341134        if m & Qt.AltModifier and b == Qt.LeftButton: 
    1135             m = m & ~AltModifier 
     1135            m = m & ~Qt.AltModifier 
    11361136            b = Qt.MidButton 
    11371137         
     
    11941194        point = self.mapToScene(event.pos()) 
    11951195        if not self._pressed_mouse_button: 
    1196             self.emit(SIGNAL('point_hovered(Point*)'), self.nearest_point(point)) 
     1196            if self.receivers(SIGNAL('point_hovered(Point*)')) > 0: 
     1197                self.emit(SIGNAL('point_hovered(Point*)'), self.nearest_point(point)) 
    11971198         
    11981199        ## We implement a workaround here, because sometimes mouseMoveEvents are not fast enough 
Note: See TracChangeset for help on using the changeset viewer.