Skip to content

Commit

Permalink
editor right button event
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Feb 16, 2015
1 parent 800decd commit d085ee5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions liteidex/src/plugins/liteeditor/liteeditorwidgetbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2938,6 +2938,12 @@ void LiteEditorWidgetBase::mousePressEvent(QMouseEvent *e)
m_uplinkSkip = true;
this->stopUplinkTimer();
}
} else if (e->button() == Qt::RightButton) {
int eventCursorPosition = cursorForPosition(e->pos()).position();
if (eventCursorPosition < textCursor().selectionStart()
|| eventCursorPosition > textCursor().selectionEnd()) {
setTextCursor(cursorForPosition(e->pos()));
}
}
QPlainTextEdit::mousePressEvent(e);
}
Expand Down

0 comments on commit d085ee5

Please sign in to comment.