fix some empty actions
This commit is contained in:
parent
a1383a7e97
commit
10e328f2a3
1 changed files with 5 additions and 1 deletions
|
@ -513,7 +513,7 @@ export const dbUtils = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
reverseSelection: () => {
|
reverseSelection: () => {
|
||||||
if (!get(selection).hasAnyChildren(new ListRootItem(), true, ['waypoints'])) {
|
if (!get(selection).hasAnyChildren(new ListRootItem(), true, ['waypoints']) || get(gpxStatistics).local.points?.length <= 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
applyGlobal((draft) => {
|
applyGlobal((draft) => {
|
||||||
|
@ -1053,6 +1053,10 @@ export const dbUtils = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (points.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getElevation(points).then((elevations) => {
|
getElevation(points).then((elevations) => {
|
||||||
applyGlobal((draft) => {
|
applyGlobal((draft) => {
|
||||||
applyToOrderedSelectedItemsFromFile((fileId, level, items) => {
|
applyToOrderedSelectedItemsFromFile((fileId, level, items) => {
|
||||||
|
|
Loading…
Reference in a new issue