| 1013 | } |
| 1014 | |
| 1015 | void WorksheetView::contextMenuEvent(QContextMenuEvent* e) { |
| 1016 | if ((m_magnificationWindow && m_magnificationWindow->isVisible() && items(e->pos()).size() == 1) || !itemAt(e->pos())) { |
| 1017 | // no item or only the magnification window under the cursor -> show the context menu for the worksheet |
| 1018 | m_cursorPos = mapToScene(e->pos()); |
| 1019 | m_calledFromContextMenu = true; |
| 1020 | m_worksheet->createContextMenu()->exec(QCursor::pos()); |
| 1021 | } else { |
| 1022 | // propagate the event to the scene and graphics items |
| 1023 | QGraphicsView::contextMenuEvent(e); |
| 1024 | } |
| 1025 | } |
| 1026 | |
| 1027 | void WorksheetView::keyPressEvent(QKeyEvent* event) { |
| 1028 | // handle delete |
nothing calls this directly
no test coverage detected