Changeset 8602:e6681ec5b8b4 in orange


Ignore:
Timestamp:
08/04/11 20:53:25 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
4b11f60044b1acac969c8be3e75c427bf589a6ae
Message:

Propagate unhandled events to the scene so that point tooltips are visible.

Files:
3 edited

Legend:

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

    r8577 r8602  
    788788        if event.button() == Qt.LeftButton and self.state == PANNING: 
    789789            self._last_pan_pos = point 
    790         event.accept() 
     790            event.accept() 
     791        else: 
     792            orangeplot.Plot.mousePressEvent(self, event) 
    791793             
    792794    def mouseMoveEvent(self, event): 
     
    839841                tp = self.mapFromScene(QPointF(x,y) * self.map_transform * self._zoom_transform) 
    840842                self.showTip(tp.x(), tp.y(), text) 
     843            else: 
     844                orangeplot.Plot.mouseMoveEvent(self, event) 
    841845         
    842846    def mouseReleaseEvent(self, event): 
     
    861865            self.scene().removeItem(self._current_rs_item) 
    862866            self._current_rs_item = None 
     867            return 
     868        orangeplot.Plot.mouseReleaseEvent(self, event) 
    863869     
    864870    def mouseStaticClick(self, event): 
     
    922928        self.zoom(point, pow(2,d)) 
    923929             
    924     def mouseDoubleClickEvent(self, event): 
    925         ## We don't want this events to propagate to the scene 
    926         event.ignore() 
    927          
    928     def contextMenuEvent(self, event): 
    929         event.ignore() 
    930              
    931930    @staticmethod 
    932931    def transform_from_rects(r1, r2): 
  • source/orangeplot/networkcurve.cpp

    r8600 r8602  
    2222    set_selected(false); 
    2323    set_label(""); 
     24    setAcceptHoverEvents(true); 
    2425} 
    2526 
  • source/orangeplot/plot.cpp

    r8589 r8602  
    4646{ 
    4747    setScene(new QGraphicsScene(this)); 
    48     scene()->installEventFilter(new SceneEventFilter(this)); 
    4948    clipItem = new QGraphicsRectItem(); 
    5049    clipItem->setPen(Qt::NoPen); 
Note: See TracChangeset for help on using the changeset viewer.