From ee917776f0ef3bc7f65cfaca37cd86b001512e14 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 25 Sep 2013 09:52:16 +0100 Subject: [PATCH] Set savedPoints on reverting, load or save On reverting set back to the changeGeneration integer On loading set to the new changeGeneration integer On saving set to the current changeGeneration integer --- lib/file-control.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/file-control.php b/lib/file-control.php index dac0584..36acccd 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -305,7 +305,7 @@ if ($_GET['action']=="save") { document.getElementById('userVersionFile').value = cM.getValue(); // Revert back to original cM.setValue(document.getElementById('loadedFile').value); - top.ICEcoder.changedContent[thisTab-1] = 0; + top.ICEcoder.savedPoints[thisTab-1] = cM.changeGeneration(); top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = ""; cM.clearHistory(); // Now for the new file @@ -350,6 +350,7 @@ if (action=="load") { top.ICEcoder.switchMode(); cM = top.ICEcoder.getcMInstance(); cM.setValue(document.getElementById('loadedFile').value); + top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration(); top.document.getElementById('content').style.visibility='visible'; top.ICEcoder.switchTab(top.ICEcoder.selectedTab); top.ICEcoder.focus(); @@ -425,7 +426,8 @@ if (action=="save") { } if (action=="doneSave") { - top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 0; + cM = top.ICEcoder.getcMInstance(); + top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration(); top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab); }