diff --git a/Sources/arm/App.hx b/Sources/arm/App.hx index 2c5cc1e5..6f4437e2 100644 --- a/Sources/arm/App.hx +++ b/Sources/arm/App.hx @@ -199,7 +199,9 @@ class App extends iron.Trait { var right = appw / 2 + modalW / 2; var top = apph / 2 - modalH / 2; var bottom = apph / 2 + modalH / 2; - if (mouse.x < left || mouse.x > right || mouse.y < top || mouse.y > bottom) { + var mx = mouse.x + iron.App.x(); + var my = mouse.y + iron.App.y(); + if (mx < left || mx > right || my < top || my > bottom) { showFiles = false; } } diff --git a/Sources/arm/UITrait.hx b/Sources/arm/UITrait.hx index e4970aab..58058497 100644 --- a/Sources/arm/UITrait.hx +++ b/Sources/arm/UITrait.hx @@ -2671,6 +2671,13 @@ void main() { // Import is synchronous for now scaleToBounds(); + if (mergedObject != null) { + mergedObject.remove(); + iron.data.Data.deleteMesh(mergedObject.data.handle); + mergedObject = null; + } + selectPaintObject(paintObjects[0]); + if (paintObjects.length > 1) { objectsHandle.selected = true;