From f5c32243a6cf2b6ff413e159d5778b645b009b55 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Thu, 12 Jun 2025 20:17:24 -0600 Subject: [PATCH] Gui: fix double-click on checkboxes locking the properties --- src/Gui/propertyeditor/PropertyItemDelegate.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.cpp b/src/Gui/propertyeditor/PropertyItemDelegate.cpp index 6bebaf5ae7..a85ccf4559 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.cpp +++ b/src/Gui/propertyeditor/PropertyItemDelegate.cpp @@ -163,10 +163,13 @@ void PropertyItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem & bool PropertyItemDelegate::editorEvent (QEvent * event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) { - if (event && event->type() == QEvent::MouseButtonPress) - this->pressed = true; - else - this->pressed = false; + if (!event || event->type() == QEvent::MouseButtonDblClick) { + // ignore double click, as it could cause editor lock with checkboxes + // due to the editor being close immediately after toggling the checkbox + // which is currently done on first click + return true; + } + this->pressed = event->type() == QEvent::MouseButtonPress; return QItemDelegate::editorEvent(event, model, option, index); }