From d3ce061d5e80c20f20d7fcb95d3608c7c6ad59c0 Mon Sep 17 00:00:00 2001 From: tetektoza Date: Fri, 5 Sep 2025 02:05:52 +0200 Subject: [PATCH] Gui: Allow long press timeout for Clarify Selection to be configurable --- src/Gui/View3DInventorViewer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index f6ac7667ac..1d9bcbbe61 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -234,7 +234,6 @@ class Gui::ViewerEventFilter : public QObject public: ViewerEventFilter() : longPressTimer(new QTimer(this)) { longPressTimer->setSingleShot(true); - longPressTimer->setInterval(1000); // after 1s of LMB press on viewport it gets toggled connect(longPressTimer, &QTimer::timeout, [this]() { if (currentViewer) { triggerClarifySelection(); @@ -300,6 +299,11 @@ public: if (mouseEvent->button() == Qt::LeftButton) { currentViewer = static_cast(obj); pressPosition = mouseEvent->pos(); + + int longPressTimeout = App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("LongPressTimeout", 1000); + longPressTimer->setInterval(longPressTimeout); longPressTimer->start(); } }