806862444d8846d0099943ecd2c063623d85a9c5,Orange/widgets/unsupervised/owdistancemap.py,DistanceMapItem,mousePressEvent,#DistanceMapItem#Any#,39

Before Change


                    self.__clearSelections()

                area = QRectF(event.pos(), QSizeF(0, 0))
                selrange = self._selectionForArea(area)
                rect = self._visualRectForSelection(selrange)
                item = QGraphicsRectItem(rect, self)
                pen = QPen(Qt.red, 0)
                pen.setCosmetic(True)
                item.setPen(pen)
                self.__dragging = item, area

        super().mousePressEvent(event)
        event.accept()

After Change



    def mousePressEvent(self, event):
        if event.button() == Qt.LeftButton:
            r, c = self._cellAt(event.pos())
            if r != -1 and c != -1:
                if not event.modifiers() & Qt.ControlModifier:
                    self.__select(QRect(), self.Clear)
                selrange = QRect(c, r, 2, 2)
                self.__elastic_band_select(selrange, self.Select | self.Clear)

        super().mousePressEvent(event)
        event.accept()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: biolab/orange3
Commit Name: 806862444d8846d0099943ecd2c063623d85a9c5
Time: 2014-12-30
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/unsupervised/owdistancemap.py
Class Name: DistanceMapItem
Method Name: mousePressEvent


Project Name: biolab/orange3
Commit Name: 806862444d8846d0099943ecd2c063623d85a9c5
Time: 2014-12-30
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/unsupervised/owdistancemap.py
Class Name: DistanceMapItem
Method Name: mousePressEvent


Project Name: biolab/orange3
Commit Name: 806862444d8846d0099943ecd2c063623d85a9c5
Time: 2014-12-30
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/unsupervised/owdistancemap.py
Class Name: DistanceMapItem
Method Name: mouseMoveEvent


Project Name: biolab/orange3
Commit Name: 806862444d8846d0099943ecd2c063623d85a9c5
Time: 2014-12-30
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/unsupervised/owdistancemap.py
Class Name: DistanceMapItem
Method Name: mouseReleaseEvent