Fix reference images being selectable through model

This commit is contained in:
JannisX11 2023-04-27 19:36:33 +02:00
parent 2e575e9a96
commit 0b9c2f027a

View File

@ -464,7 +464,11 @@ function setupInterface() {
Interface.work_screen.addEventListener('dblclick', event => {
let reference = ReferenceImage.active.find(reference => reference.projectMouseCursor(event.clientX, event.clientY));
if (reference) reference.select();
if (!reference) return;
if (document.querySelector('.preview:hover')) {
if (Preview.selected.raycast(event)) return;
}
reference.select();
});
document.getElementById('texture_list').addEventListener('click', e => unselectTextures());