End file browser

This commit is contained in:
luboslenco
2019-02-27 22:34:24 +01:00
parent 85cacdf42f
commit bc3f3dc298
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -16,7 +16,13 @@ class Project {
UITrait.inst.showMessage("Error: .arm file expected");
return;
}
var current = @:privateAccess kha.graphics4.Graphics2.current;
if (current != null) current.end();
importProject(path);
if (current != null) current.begin(false);
};
}
@@ -108,8 +114,8 @@ class Project {
iron.data.Data.deleteMesh(UITrait.inst.paintObject.data.handle);
iron.data.Data.getMesh("mesh_" + n, n, function(md:MeshData) {
var hasCurrent = @:privateAccess kha.graphics4.Graphics2.current != null;
if (hasCurrent) UITrait.inst.ui.g.end();
var current = @:privateAccess kha.graphics4.Graphics2.current;
if (current != null) current.end();
UITrait.inst.autoFillHandle.selected = false;
UITrait.inst.paintObject.setData(md);
@@ -141,7 +147,7 @@ class Project {
UITrait.inst.assetId = 0;
ViewportUtil.resetViewport();
if (hasCurrent) UITrait.inst.ui.g.begin(false);
if (current != null) current.begin(false);
});
}
+1 -1
View File
@@ -1793,7 +1793,7 @@ class UITrait extends iron.Trait {
// Fill in last odd spot
if (assets.length % 2 == 1) {
var empty = bundled.get("empty.jpg");
ui.image(empty);
ui.image(empty, 0x00000000);
}
}
else {