From 0ac71c5e80bc30921354bde2748c6a91e50ec7a5 Mon Sep 17 00:00:00 2001 From: Pieter Hijma Date: Mon, 1 Sep 2025 17:06:40 +0200 Subject: [PATCH] Gui: Fix Property View copy bug The context menu of the property view shows a "Copy" action for properties with which the value of the property can be copied to the clipboard. When multiple properties are selected, this menu item appears multiple times and in that case it copies the name of one of the properties. This commit fixes this. --- src/Gui/propertyeditor/PropertyEditor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index bb75964c74..0b0343f15a 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -751,6 +751,10 @@ void PropertyEditor::contextMenuEvent(QContextMenuEvent*) if (index.column() > 0) { continue; } + } + + // copy value to clipboard + if (props.size() == 1) { const QVariant valueToCopy = contextIndex.data(Qt::DisplayRole); if (valueToCopy.isValid()) { QAction* copyAction = menu.addAction(tr("Copy"));