mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-01 08:12:32 +00:00
fix selection bug
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
let sortable: Sortable;
|
let sortable: Sortable;
|
||||||
let orientation = getContext<'vertical' | 'horizontal'>('orientation');
|
let orientation = getContext<'vertical' | 'horizontal'>('orientation');
|
||||||
|
|
||||||
function updateToSelection() {
|
function updateToSelection(e) {
|
||||||
if (updating) return;
|
if (updating) return;
|
||||||
updating = true;
|
updating = true;
|
||||||
// Sortable updates selection
|
// Sortable updates selection
|
||||||
@@ -61,6 +61,13 @@
|
|||||||
element.classList.contains('sortable-selected')
|
element.classList.contains('sortable-selected')
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ($selection.size > 1 && !(e.ctrlKey || e.metaKey || e.shiftKey)) {
|
||||||
|
// Fix bug that sometimes causes a single select to be treated as a multi-select
|
||||||
|
$selection.clear();
|
||||||
|
$selection.set(item.extend(getRealId(changed[0])), true);
|
||||||
|
}
|
||||||
|
|
||||||
return $selection;
|
return $selection;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user