Changeset 8883:18b481d3ee85 in orange


Ignore:
Timestamp:
09/02/11 10:15:38 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
b1ff6a0468861007cd098b231925145fb1b128c7
Message:

Added point_rightclicked signal.

Location:
orange/OrangeWidgets/plot
Files:
2 edited

Legend:

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

    r8172 r8883  
    3131PANNING = 4 
    3232SELECT_RECTANGLE = SELECT 
     33SELECT_RIGHTCLICK = SELECT 
    3334 
    3435SELECTION_ADD = 0 
  • orange/OrangeWidgets/plot/owplot.py

    r8877 r8883  
    11411141        if b == Qt.LeftButton and not m: 
    11421142            return self.state 
     1143         
     1144        if b == Qt.RightButton and not m and self.state == SELECT: 
     1145            return SELECT_RIGHTCLICK 
    11431146             
    11441147        if b == Qt.MidButton: 
     
    13071310             
    13081311        a = self.mouse_action(event) 
    1309              
     1312        b = event.buttons() | event.button() 
     1313         
    13101314        if a == ZOOMING: 
    13111315            if event.button() == Qt.LeftButton: 
     
    13161320                return False 
    13171321            return True 
    1318         elif a == SELECT: 
     1322        elif a == SELECT and b == Qt.LeftButton: 
    13191323            point_item = self.nearest_point(point) 
    13201324            b = self.selection_behavior 
     
    13251329                point_item.set_selected(b == self.AddSelection or (b == self.ToggleSelection and not point_item.is_selected())) 
    13261330            self.emit(SIGNAL('selection_changed()')) 
     1331        elif a == SELECT and b == Qt.RightButton: 
     1332            point_item = self.nearest_point(point) 
     1333            if point_item: 
     1334                self.emit(SIGNAL('point_rightclicked(Point*)'), self.nearest_point(point)) 
    13271335        else: 
    13281336            return False 
Note: See TracChangeset for help on using the changeset viewer.