Fix removing a nm row did not re-index

This caused duplications or holes depending on what you did before or after
This commit is contained in:
nathangray 2020-08-07 14:12:30 -06:00 committed by Ralf Becker
parent 7752fe03de
commit 8f769a9550
2 changed files with 2 additions and 2 deletions

View File

@ -571,7 +571,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
// Need to delete first as there's a good chance indexes will change in an unknown way
// and we can't always find it by UID after due to duplication
this.controller._grid.deleteRow(entry.idx);
this.controller.deleteRow(uid);
// Pretend it's a new row, let app tell us where it goes and we'll mark it as new
if (!this.refresh_add(uid, et2_nextmatch.UPDATE)) {
// App did not want the row, or doesn't know where it goes but we've already removed it...

View File

@ -863,7 +863,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
// Need to delete first as there's a good chance indexes will change in an unknown way
// and we can't always find it by UID after due to duplication
this.controller._grid.deleteRow(entry.idx);
this.controller.deleteRow(uid);
// Pretend it's a new row, let app tell us where it goes and we'll mark it as new
if(!this.refresh_add(uid, et2_nextmatch.UPDATE))