1. biolab
  2. Untitled project
  3. orange

Commits

Aleš Erjavec  committed 957e603

Ignore mouse press events not started on the plot canvas.

  • Participants
  • Parent commits dcbaa22
  • Branches default

Comments (0)

Files changed (1)

File Orange/OrangeWidgets/OWGraph.py

View file
  • Ignore whitespace
             if handled: return
         QwtPlot.mousePressEvent(self, e)
         canvasPos = self.canvas().mapFrom(self, e.pos())
+
+        if not self.canvas().contentsRect().contains(canvasPos):
+            # Press on the legend or axis widget.
+            return
+
         xFloat = self.invTransform(QwtPlot.xBottom, canvasPos.x())
         yFloat = self.invTransform(QwtPlot.yLeft, canvasPos.y())
         self.xpos = canvasPos.x()