Undo fixes

This commit is contained in:
luboslenco
2019-02-26 23:25:45 +01:00
parent d0af666bc7
commit b166cf6ce1
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -557,7 +557,8 @@ class UITrait extends iron.Trait {
var down = iron.system.Input.getMouse().down() || iron.system.Input.getPen().down();
if (down && !kb.down("control")) {
if (mouse.x <= iron.App.w()) {
if (mouse.x < iron.App.w() && mouse.x > iron.App.x() &&
mouse.y < iron.App.h() && mouse.y > iron.App.y()) {
if (brushTime == 0 && C.undo_steps > 0) { // Paint started
pushUndo = true;
if (projectPath != "") {
@@ -1829,7 +1830,7 @@ class UITrait extends iron.Trait {
ui.separator();
if (ui.panel(Id.handle({selected: false}), "Project Quality", 1)) {
ui.combo(resHandle, ["1K", "2K", "4K", "8K", "16K", "20K"], "Res", true);
ui.combo(resHandle, ["1K", "2K", "4K", "8K", "16K"], "Res", true);
if (resHandle.changed) {
iron.App.notifyOnRender(Layers.resizeLayers);
UIView2D.inst.uvmap = null;
+1 -1
View File
@@ -181,7 +181,7 @@ class RenderPathDeferred {
var tid = arm.UITrait.inst.selectedLayer.id;
if (arm.UITrait.inst.pushUndo) {
if (arm.UITrait.inst.pushUndo && arm.UITrait.inst.C.undo_steps > 0) {
var i = arm.UITrait.inst.undoI;
if (arm.UITrait.inst.paintHeight) {
path.setTarget("texpaint_undo" + i, ["texpaint_nor_undo" + i, "texpaint_pack_undo" + i, "texpaint_opt_undo" + i]);