mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 00:34:00 +01:00
Deselect file we're closing in the file manager
This commit is contained in:
@@ -572,7 +572,7 @@ var ICEcoder = {
|
||||
|
||||
// Close the tab upon request
|
||||
closeTab: function(closeTabNum) {
|
||||
var cM, okToRemove;
|
||||
var cM, okToRemove, closeFileName;
|
||||
|
||||
cM = ICEcoder.getcMInstance();
|
||||
okToRemove = true;
|
||||
@@ -581,6 +581,9 @@ var ICEcoder = {
|
||||
}
|
||||
|
||||
if (okToRemove) {
|
||||
// Get the filename of tab we're closing
|
||||
closeFileName = top.ICEcoder.openFiles[closeTabNum-1];
|
||||
|
||||
// recursively copy over all tabs & data from the tab to the right, if there is one
|
||||
for (var i=closeTabNum;i<ICEcoder.openFiles.length;i++) {
|
||||
top.document.getElementById('tab'+i).innerHTML = top.document.getElementById('tab'+(i+1)).innerHTML;
|
||||
@@ -615,6 +618,9 @@ var ICEcoder = {
|
||||
top.ICEcoder.changedContent.splice(closeTabNum-1,1);
|
||||
top.parent.ICEcoder.redoTabHighlight(ICEcoder.selectedTab);
|
||||
|
||||
// Remove any highlighting from the file manager
|
||||
top.ICEcoder.selectDeselectFile('deselect',top.ICEcoder.filesFrame.contentWindow.document.getElementById(closeFileName.replace(/\//g,"|")));
|
||||
|
||||
top.ICEcoder.setPreviousFiles();
|
||||
}
|
||||
// Lastly, stop it from trying to also switch tab
|
||||
|
||||
Reference in New Issue
Block a user