Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Improving the selection of files

kristiyanddd3068f6e1998
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index acffa1749..b722ce697 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -72,7 +72,6 @@ define(function(require, exports) {
}
if (TSCORE.FileOpener.getOpenedFilePath() !== undefined) {
TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getPrevFile(TSCORE.FileOpener.getOpenedFilePath()));
- TSCORE.PerspectiveManager.selectFile(TSCORE.FileOpener.getOpenedFilePath());
}
return false;
});
@@ -83,7 +82,6 @@ define(function(require, exports) {
}
if (TSCORE.FileOpener.getOpenedFilePath() !== undefined) {
TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getNextFile(TSCORE.FileOpener.getOpenedFilePath()));
- TSCORE.PerspectiveManager.selectFile(TSCORE.FileOpener.getOpenedFilePath());
}
return false;
});
diff --git a/data/js/ext.api.js b/data/js/ext.api.js
index 0e7d37d67..adf4067ce 100644
--- a/data/js/ext.api.js
+++ b/data/js/ext.api.js
@@ -50,7 +50,6 @@ define(function(require, exports, module) {
// TODO open next selected file
//} else {
TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getNextFile(TSCORE.FileOpener.getOpenedFilePath()));
- TSCORE.PerspectiveManager.selectFile(TSCORE.FileOpener.getOpenedFilePath());
//}
}
diff --git a/data/js/fileopener.js b/data/js/fileopener.js
index b79748080..1a92bc9c3 100644
--- a/data/js/fileopener.js
+++ b/data/js/fileopener.js
@@ -81,11 +81,9 @@ define(function(require, exports, module) {
$('#closeOpenedFile').on("click", closeFile);
$('#nextFileButton').on("click", function() {
TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getNextFile(_openedFilePath));
- TSCORE.PerspectiveManager.selectFile(TSCORE.FileOpener.getOpenedFilePath());
});
$('#prevFileButton').on("click", function() {
TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getPrevFile(_openedFilePath));
- TSCORE.PerspectiveManager.selectFile(TSCORE.FileOpener.getOpenedFilePath());
});
$('#reloadFile').on("click", function() {
TSCORE.FileOpener.openFile(_openedFilePath);
@@ -388,6 +386,8 @@ define(function(require, exports, module) {
// Clearing file selection on file load and adding the current file path to the selection
TSCORE.PerspectiveManager.clearSelectedFiles();
+ TSCORE.PerspectiveManager.selectFile(TSCORE.FileOpener.getOpenedFilePath());
+
TSCORE.selectedFiles.push(filePath);
_isFileOpened = true;
TSCORE.openFileViewer();