From 78df8727864cec09ff6de812450dc2aaa97ff587 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Fri, 22 Dec 2017 22:38:04 +0100 Subject: [PATCH] Don't show the draw pointer preview creating a selection --- src/capture/widget/capturewidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/capture/widget/capturewidget.cpp b/src/capture/widget/capturewidget.cpp index 49ce01f3..4142d220 100644 --- a/src/capture/widget/capturewidget.cpp +++ b/src/capture/widget/capturewidget.cpp @@ -163,10 +163,11 @@ void CaptureWidget::paintEvent(QPaintEvent *) { // If we are creating a new modification to the screenshot we just draw // a temporal modification without antialiasing in the pencil tool for // performance. When we are not drawing we just shot the modified screenshot - if (m_mouseIsClicked && m_state != CaptureButton::TYPE_MOVESELECTION) { + bool stateIsSelection = m_state == CaptureButton::TYPE_MOVESELECTION; + if (m_mouseIsClicked && !stateIsSelection) { painter.drawPixmap(0, 0, m_screenshot->paintTemporalModification( m_modifications.last())); - } else if (m_toolIsForDrawing) { + } else if (m_toolIsForDrawing && !stateIsSelection) { CaptureButton::ButtonType type = CaptureButton::ButtonType::TYPE_LINE; if (m_state == CaptureButton::ButtonType::TYPE_MARKER) { type = CaptureButton::ButtonType::TYPE_MARKER;