New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ui] Right click on text element in AttributeEditor open Copy/Paste menu #2366
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "paste" menu should be disabled even if the clipboard has a valid content when the target is a read-only text field.
Otherwise, everything works fine.
d8627e1
to
4c6cc4f
Compare
4c6cc4f
to
e3e25e6
Compare
The selection of the text should work with the mouse. |
Clipboard.clear() | ||
Clipboard.setText(attribute.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested:
Clipboard.clear() | |
Clipboard.setText(attribute.value) | |
textField.copy() |
@@ -206,6 +206,7 @@ RowLayout { | |||
Component { | |||
id: textField_component | |||
TextField { | |||
id: textField |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem comes from the root.forceActiveFocus()
in the onAccepted event.
} | ||
MouseArea { | ||
anchors.fill: parent | ||
acceptedButtons: Qt.AllButtons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acceptedButtons: Qt.AllButtons | |
acceptedButtons: Qt.RightButton |
if (mouse.button == Qt.RightButton) { | ||
var menu = menuCopy.createObject(parameterLabel) | ||
menu.parent = parameterLabel | ||
menu.popup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kills the text selection, I'm not sure how to fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe with persistentSelection...
Right click on text element in AttributeEditor open Copy/Paste menu