Skip to content

Commit b14a26e

Browse files
committed
Fix: Save image not saving the correct page in manga mode
1 parent 62fd2c3 commit b14a26e

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/reading.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5386,6 +5386,7 @@ module.exports = {
53865386
read: read,
53875387
images: function(){return images},
53885388
imagesNum: imagesNum,
5389+
indexNum: function(){return indexNum},
53895390
contentNum: function(){return contentNum},
53905391
imagesNumLoad: imagesNumLoad,
53915392
imagesData: function(){return imagesData},

scripts/reading/context-menu.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ function saveAllImages(index = false)
8282
const images = reading.images();
8383
const imagesData = reading.imagesData();
8484

85+
if(index !== false)
86+
{
87+
if(_config.readingManga && !reading.readingViewIs('scroll'))
88+
index = (reading.indexNum() - index) - 1;
89+
}
90+
8591
electronRemote.dialog.showOpenDialog({properties: ['openDirectory', 'createDirectory'], buttonLabel: language.buttons.save}).then(async function(files) {
8692

8793
if(files.filePaths && files.filePaths[0] && fs.statSync(files.filePaths[0]).isDirectory())

scripts/title-bar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function setMenu(_menu)
4343
if(process.platform == 'darwin') // Keep native menu in macOS
4444
_menu = [];
4545

46-
let menu = [];
46+
menu = [];
4747

4848
for(let i = 0, len = _menu.length; i < len; i++)
4949
{

0 commit comments

Comments
 (0)