TextEditor::BaseTextEditor *m_editor;
QWidget *m_configurationWidget;
bool m_revertChunkEnabled;
+ bool m_mouseDragging;
};
VCSBaseEditorWidgetPrivate::VCSBaseEditorWidgetPrivate(const VCSBaseEditorParameters *type) :
m_fileLogAnnotateEnabled(false),
m_editor(0),
m_configurationWidget(0),
- m_revertChunkEnabled(false)
+ m_revertChunkEnabled(false),
+ m_mouseDragging(false)
{
}
void VCSBaseEditorWidget::mouseMoveEvent(QMouseEvent *e)
{
+ if (e->buttons()) {
+ d->m_mouseDragging = true;
+ TextEditor::BaseTextEditorWidget::mouseMoveEvent(e);
+ return;
+ }
+
bool overrideCursor = false;
Qt::CursorShape cursorShape;
void VCSBaseEditorWidget::mouseReleaseEvent(QMouseEvent *e)
{
- if (d->m_parameters->type == LogOutput || d->m_parameters->type == AnnotateOutput) {
+ const bool wasDragging = d->m_mouseDragging;
+ d->m_mouseDragging = false;
+ if (!wasDragging && (d->m_parameters->type == LogOutput || d->m_parameters->type == AnnotateOutput)) {
if (e->button() == Qt::LeftButton &&!(e->modifiers() & Qt::ShiftModifier)) {
QTextCursor cursor = cursorForPosition(e->pos());
d->m_currentChange = changeUnderCursor(cursor);