From eebfa2098d63ae23d98559c736689dd103adf06f Mon Sep 17 00:00:00 2001 From: Jeffrey Fisher Date: Fri, 26 Oct 2012 23:56:36 -0700 Subject: [PATCH 1/2] Fix for issue #104 on the mac. --- src/project/WorkingSetView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/project/WorkingSetView.js b/src/project/WorkingSetView.js index fb8a445c9dc..ee1b73fa7fd 100644 --- a/src/project/WorkingSetView.js +++ b/src/project/WorkingSetView.js @@ -490,9 +490,15 @@ define(function (require, exports, module) { function _handleFileRemoved(file) { var $listItem = _findListItemFromFile(file); if ($listItem) { + // Make the next file in the list show the close icon, + // without having to move the mouse, if there is a next file. + var $nextListItem = $listItem.next(); + if ($nextListItem) { + _updateFileStatusIcon($nextListItem, false, true); + } $listItem.remove(); } - + _redraw(); } From 3f79987d20bcec7fbb3866e854d5c0fe213060e8 Mon Sep 17 00:00:00 2001 From: Jeffrey Fisher Date: Fri, 2 Nov 2012 03:23:13 -0700 Subject: [PATCH 2/2] Issue #104 fixes after code review --- src/project/WorkingSetView.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/project/WorkingSetView.js b/src/project/WorkingSetView.js index ee1b73fa7fd..23a2f462acb 100644 --- a/src/project/WorkingSetView.js +++ b/src/project/WorkingSetView.js @@ -490,12 +490,14 @@ define(function (require, exports, module) { function _handleFileRemoved(file) { var $listItem = _findListItemFromFile(file); if ($listItem) { - // Make the next file in the list show the close icon, - // without having to move the mouse, if there is a next file. - var $nextListItem = $listItem.next(); - if ($nextListItem) { - _updateFileStatusIcon($nextListItem, false, true); - } + // Make the next file in the list show the close icon, + // without having to move the mouse, if there is a next file. + var $nextListItem = $listItem.next(); + if ($nextListItem && $nextListItem.length > 0) { + var canClose = ($listItem.find(".can-close").length === 1); + var isDirty = isOpenAndDirty($nextListItem.data(_FILE_KEY)); + _updateFileStatusIcon($nextListItem, isDirty, canClose); + } $listItem.remove(); }