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.
This commit is contained in:
Pieter Hijma
2025-09-01 17:06:40 +02:00
parent e9497c2a2b
commit 0ac71c5e80

View File

@@ -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"));