Skip to content

Commit 9567b5f

Browse files
committed
avoid loading twice after dbltap
1 parent d81494e commit 9567b5f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

services/static-webserver/client/source/class/osparc/file/FilesTree.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ qx.Class.define("osparc.file.FilesTree", {
244244
configureItem: item => {
245245
item.addListener("changeOpen", e => {
246246
if (e.getData() && !item.getLoaded()) {
247+
item.setLoaded(true);
247248
const locationId = item.getLocation();
248249
const path = item.getPath();
249250
this.requestPathItems(locationId, path);

services/static-webserver/client/source/class/osparc/file/TreeFolderView.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ qx.Class.define("osparc.file.TreeFolderView", {
102102
const selectedModel = folderTree.getSelectedItem();
103103
if (selectedModel) {
104104
if (selectedModel.getPath() && !selectedModel.getLoaded()) {
105+
selectedModel.setLoaded(true);
105106
folderTree.requestPathItems(selectedModel.getLocation(), selectedModel.getPath())
106107
.then(pathModel => {
107108
if (osparc.file.FilesTree.isDir(pathModel)) {
@@ -118,6 +119,7 @@ qx.Class.define("osparc.file.TreeFolderView", {
118119
const selectedModel = e.getData();
119120
if (selectedModel) {
120121
if (selectedModel.getPath() && !selectedModel.getLoaded()) {
122+
selectedModel.setLoaded(true);
121123
folderTree.requestPathItems(selectedModel.getLocation(), selectedModel.getPath())
122124
.then(pathModel => {
123125
folderTree.openNodeAndParents(pathModel);

0 commit comments

Comments
 (0)