| 920 | } |
| 921 | |
| 922 | void WorksheetView::mouseReleaseEvent(QMouseEvent* event) { |
| 923 | if (event->button() == Qt::LeftButton && m_mouseMode == MouseMode::ZoomSelection) { |
| 924 | m_selectionBandIsShown = false; |
| 925 | viewport()->repaint(QRect(m_selectionStart, m_selectionEnd).normalized()); |
| 926 | |
| 927 | // don't zoom if very small region was selected, avoid occasional/unwanted zooming |
| 928 | m_selectionEnd = event->pos(); |
| 929 | if (abs(m_selectionEnd.x() - m_selectionStart.x()) > 20 && abs(m_selectionEnd.y() - m_selectionStart.y()) > 20) |
| 930 | fitInView(mapToScene(QRect(m_selectionStart, m_selectionEnd).normalized()).boundingRect(), Qt::KeepAspectRatio); |
| 931 | } |
| 932 | |
| 933 | QGraphicsView::mouseReleaseEvent(event); |
| 934 | } |
| 935 | |
| 936 | void WorksheetView::mouseDoubleClickEvent(QMouseEvent*) { |
| 937 | Q_EMIT propertiesExplorerRequested(); |
nothing calls this directly
no test coverage detected