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:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user