refactor: ctrl+click

This commit is contained in:
Roy Qu 2024-09-13 19:04:05 +08:00
parent 6d3597db29
commit dc7d1ddef3
1 changed files with 2 additions and 2 deletions

View File

@ -1169,7 +1169,7 @@ void Editor::keyReleaseEvent(QKeyEvent *event)
void Editor::mouseMoveEvent(QMouseEvent *event) void Editor::mouseMoveEvent(QMouseEvent *event)
{ {
if(event->modifiers() == Qt::ControlModifier && !selAvail()) { if(event->modifiers() == Qt::ControlModifier) {
cancelHint(); cancelHint();
QSynedit::BufferCoord p; QSynedit::BufferCoord p;
@ -1485,7 +1485,7 @@ void Editor::mouseReleaseEvent(QMouseEvent *event)
{ {
// if ctrl+clicked // if ctrl+clicked
if ((event->modifiers() == Qt::ControlModifier) if ((event->modifiers() == Qt::ControlModifier)
&& (event->button() == Qt::LeftButton) && !selAvail()) { && (event->button() == Qt::LeftButton)) {
QSynedit::BufferCoord p; QSynedit::BufferCoord p;
if (mParser && pointToCharLine(event->pos(),p)) { if (mParser && pointToCharLine(event->pos(),p)) {
cancelHoverLink(); cancelHoverLink();