mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-23 05:56:36 +02:00
Add node to graph with Ctrl+V if valid node content is in the clipboard
Attempt to paste the clipboard's content in the graph when Ctrl+V is pressed. If the clipboard contains a valid node description, add the corresponding node to the graph. Otherwise, do nothing.
This commit is contained in:
parent
751bad96c6
commit
ddda62a652
5 changed files with 80 additions and 0 deletions
|
@ -85,6 +85,12 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
/// Paste content of clipboard to graph editor and create new node if valid
|
||||
function pasteNode()
|
||||
{
|
||||
var copiedContent = Clipboard.getText()
|
||||
uigraph.pasteNode(copiedContent)
|
||||
}
|
||||
|
||||
Keys.onPressed: {
|
||||
if (event.key === Qt.Key_F)
|
||||
|
@ -100,6 +106,9 @@ Item {
|
|||
if (event.key === Qt.Key_C)
|
||||
if (event.modifiers == Qt.ControlModifier)
|
||||
copyNode()
|
||||
if (event.key === Qt.Key_V)
|
||||
if (event.modifiers == Qt.ControlModifier)
|
||||
pasteNode()
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue