diff --git a/apps/spreadsheeteditor/main/app/view/SortDialog.js b/apps/spreadsheeteditor/main/app/view/SortDialog.js index fd8ad26eb..3d6a42f32 100644 --- a/apps/spreadsheeteditor/main/app/view/SortDialog.js +++ b/apps/spreadsheeteditor/main/app/view/SortDialog.js @@ -218,8 +218,9 @@ define([ 'text!spreadsheeteditor/main/app/template/SortDialog.template', refreshList: function(levels) { this.levels = []; + + var arr = []; if (levels) { - var arr = []; for (var i=0; i0) && this.sortList.selectByIndex(0); + } else { + arr.push({ + columnIndex: null, + levelIndex: 0, + sort: Asc.c_oAscSortOptions.ByValue, + order: Asc.c_oAscSortOptions.Ascending + }); } + this.sortList.store.reset(arr); + (this.sortList.store.length>0) && this.sortList.selectByIndex(0); + this.updateButtons(); },