mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 15:43:25 +00:00
fix some empty actions
This commit is contained in:
@@ -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) => {
|
||||||
|
Reference in New Issue
Block a user