From 03af9d807cc85b94cb29644966cd9fa8d845281f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haris=20Gu=C5=A1i=C4=87?= Date: Thu, 14 Apr 2022 02:54:35 +0200 Subject: [PATCH] Remove extra timer shots when moving selection with keyboard (#2545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Haris Gušić --- src/widgets/capture/selectionwidget.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/widgets/capture/selectionwidget.cpp b/src/widgets/capture/selectionwidget.cpp index 1b6fb710..51cfc102 100644 --- a/src/widgets/capture/selectionwidget.cpp +++ b/src/widgets/capture/selectionwidget.cpp @@ -443,11 +443,10 @@ void SelectionWidget::setGeometryByKeyboard(const QRect& r) rect.setHeight(1); } setGeometry(rect); - connect( - &timer, - &QTimer::timeout, - this, - [this]() { emit geometrySettled(); }, - Qt::UniqueConnection); + connect(&timer, + &QTimer::timeout, + this, + &SelectionWidget::geometrySettled, + Qt::UniqueConnection); timer.start(400); }