зеркало из https://github.com/mozilla/pjs.git
Bug 405502 - Imported task is displayed twice in task list, r=dbo
This commit is contained in:
Родитель
3fedb3dee2
Коммит
8b792e0505
|
@ -185,12 +185,15 @@
|
||||||
|
|
||||||
addItem: function tTV_addItem(aItem) {
|
addItem: function tTV_addItem(aItem) {
|
||||||
// The rowCountChanged function takes two arguments, the index where the
|
// The rowCountChanged function takes two arguments, the index where the
|
||||||
// first row was inserted and the number of rows to insert.
|
// first row was inserted and the number of rows to insert.
|
||||||
this.binding.mTaskArray.push(aItem);
|
var index = this.binding.mHash2Index[aItem.hashId];
|
||||||
var index = this.binding.mTaskArray.length - 1;
|
if (index === undefined) {
|
||||||
this.binding.mHash2Index[aItem.hashId] = index;
|
var index = this.binding.mTaskArray.length;
|
||||||
this.treebox.rowCountChanged(index, 1);
|
this.binding.mTaskArray.push(aItem);
|
||||||
this.tree.view.selection.select(index);
|
this.binding.mHash2Index[aItem.hashId] = index;
|
||||||
|
this.treebox.rowCountChanged(index, 1);
|
||||||
|
this.tree.view.selection.select(index);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
removeItem: function tTV_removeItem(aItem) {
|
removeItem: function tTV_removeItem(aItem) {
|
||||||
|
@ -558,8 +561,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
onEndBatch: function tTO_onEndBatch() {
|
onEndBatch: function tTO_onEndBatch() {
|
||||||
this.mInBatch = false;
|
if (this.mInBatch) {
|
||||||
this.binding.refresh();
|
this.mInBatch = false;
|
||||||
|
this.binding.refresh();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad: function tTO_onLoad() {
|
onLoad: function tTO_onLoad() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче