Skip to content

Commit d5bcada

Browse files
[ui] Project: Use simpe click to open project and remove the redundant Projects menu item.
1 parent c92368d commit d5bcada

2 files changed

Lines changed: 9 additions & 21 deletions

File tree

meshroom/ui/qml/Application.qml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -737,14 +737,6 @@ Page {
737737
}
738738
}
739739
}
740-
Action {
741-
id: projectsPage
742-
text: "Projects ..."
743-
onTriggered: {
744-
const homepage = mainStack.replace("Homepage.qml")
745-
homepage.setCurrentTab("Projects")
746-
}
747-
}
748740
MenuSeparator { }
749741
Action {
750742
id: saveAction

meshroom/ui/qml/Homepage.qml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ import Controls 1.0
99
Page {
1010
id: root
1111

12-
function setCurrentTab(tabName) {
13-
const tabIndex = tabPanel.tabs.indexOf(tabName)
14-
15-
if (tabIndex) {
16-
tabPanel.currentTab = tabIndex
17-
}
18-
}
19-
2012
onVisibleChanged: {
2113
logo.playing = false
2214
if (visible) {
@@ -376,22 +368,24 @@ Page {
376368
hoverEnabled: true
377369

378370
onClicked: function(mouse) {
371+
379372
if (mouse.button === Qt.RightButton) {
380373

381374
if (!modelData["path"]) { return }
382375

383376
projectContextMenu.x = mouse.x
384377
projectContextMenu.y = mouse.y
385378
projectContextMenu.open()
379+
return
386380

387381
}
388-
}
389-
390-
onDoubleClicked: {
382+
391383
if (!modelData["path"]) {
392384
initFileDialogFolder(openFileDialog)
393385
openFileDialog.open()
394-
} else {
386+
}
387+
388+
else {
395389
// Open project
396390
mainStack.push("Application.qml")
397391
if (_reconstruction.load(modelData["path"])) {
@@ -400,7 +394,9 @@ Page {
400394
MeshroomApp.removeRecentProjectFile(modelData["path"])
401395
}
402396
}
397+
403398
}
399+
404400
}
405401

406402
Menu {
@@ -440,7 +436,7 @@ Page {
440436
anchors.centerIn: parent
441437
running: gridView.visible && modelData["thumbnail"] && thumbnail.status != Image.Ready
442438
visible: running
443-
}
439+
}
444440

445441
}
446442
Label {

0 commit comments

Comments
 (0)