From cef5075fddff865739f9e48e9a61c6c594bdc836 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Thu, 8 Nov 2018 10:28:34 +0100 Subject: [PATCH] Merged object fix --- Sources/arm/App.hx | 4 +++- Sources/arm/UITrait.hx | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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;