From 082bd44c2a60caf167697e4a9a26f077435edda8 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 20 Feb 2018 22:12:31 +0100 Subject: [PATCH] fixed zoom while editing texture --- hyper.h | 1 + mapeditor.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hyper.h b/hyper.h index ae6a21f4..785ef1cf 100644 --- a/hyper.h +++ b/hyper.h @@ -2461,6 +2461,7 @@ namespace texture { void remap(eTextureState old_tstate, eTextureState old_tstate_max); void perform_mapping(); + void finish_mapping(); void undoLock(); void undo(); diff --git a/mapeditor.cpp b/mapeditor.cpp index c1673ea5..87fb556e 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -42,11 +42,13 @@ namespace mapeditor { vid.scale *= z; // printf("scale = " LDF "\n", vid.scale); #if CAP_TEXTURE - texture::itt = xyscale(texture::itt, 1/z); // display(texture::itt); - if(texture::tstate) { + texture::itt = xyscale(texture::itt, 1/z); + if(false && texture::tstate) { calcparam(); texture::perform_mapping(); + if(texture::tstate == texture::tsAdjusting) + texture::finish_mapping(); } #endif }