mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-17 00:35:19 +02:00
[ui] GraphEditor: trigger fit on project opening
* fit when the underlying graph has changed (new/open project) * add 'F' shortcut to fit * trigger fit after UI has been fully initialized (correct sizes)
This commit is contained in:
parent
53be806019
commit
c3464fa4e8
2 changed files with 18 additions and 0 deletions
|
@ -21,6 +21,16 @@ Item {
|
|||
signal workspaceClicked()
|
||||
signal nodeDoubleClicked(var node)
|
||||
|
||||
// trigger initial fit() after initialization
|
||||
// (ensure GraphEditor has its final size)
|
||||
Component.onCompleted: firstFitTimer.start()
|
||||
|
||||
Timer {
|
||||
id: firstFitTimer
|
||||
running: false
|
||||
interval: 10
|
||||
onTriggered: fit()
|
||||
}
|
||||
|
||||
clip: true
|
||||
|
||||
|
@ -49,6 +59,12 @@ Item {
|
|||
selectNode(nodes[0])
|
||||
}
|
||||
|
||||
|
||||
Keys.onPressed: {
|
||||
if(event.key === Qt.Key_F)
|
||||
fit()
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue