| 1023 | |
| 1024 | |
| 1025 | void ByteView::mousePressEvent(QMouseEvent* event) |
| 1026 | { |
| 1027 | if (event->button() != Qt::LeftButton) |
| 1028 | return; |
| 1029 | int x = (event->pos().x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2); |
| 1030 | int y = (event->pos().y() - 2) / m_render.getFontHeight(); |
| 1031 | m_lastMouseX = x; |
| 1032 | m_lastMouseY = y; |
| 1033 | m_cursorAddr = addressFromLocation(x, y); |
| 1034 | if ((event->modifiers() & Qt::ShiftModifier) == 0) |
| 1035 | selectNone(); |
| 1036 | repositionCaret(); |
| 1037 | if ((event->modifiers() & Qt::ShiftModifier) != 0) |
| 1038 | viewport()->update(); |
| 1039 | } |
| 1040 | |
| 1041 | |
| 1042 | void ByteView::mouseMoveEvent(QMouseEvent* event) |