Editor bugfix missed cleanup before importing. Bugfix drag&drop at last position without doubleclick/drop-box

main 1.8.6
isark 1 year ago
parent 84695203ea
commit 3bbb50123a

@ -8,7 +8,7 @@
},
"package": {
"productName": "Nothing",
"version": "1.8.5"
"version": "1.8.6"
},
"tauri": {
"systemTray": {

@ -135,7 +135,7 @@ export class EditorComponent implements OnInit {
}
const bounds = this.planElemFilterBounds();
let index = event.item.data;
let index = event.currentIndex;
if (bounds) {
index += bounds[0];
}
@ -318,6 +318,9 @@ export class EditorComponent implements OnInit {
if (file) {
// We disallow multiple but interface still says it can be multiple, thus the cast.
this.planService.loadPlanFromPath(file as string, false).subscribe(plan => {
while (this.original.length > 0) {
this.original.pop();
}
plan.plan.forEach(item => this.original.push(item));
this.filterPlanElements();
});
@ -327,6 +330,9 @@ export class EditorComponent implements OnInit {
loadBasePlan() {
this.planService.getBasePlan().subscribe(plan => {
while (this.original.length > 0) {
this.original.pop();
}
plan.plan.forEach(item => this.original.push(item));
this.filterPlanElements();
})

Loading…
Cancel
Save