From f699f73f1aac364694814b1554ae0bffc7ee73a3 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 17 Jun 2018 12:06:01 +0200 Subject: [PATCH] texture:: undo clears pixels_to_draw; the number of pixels_to_draw displayed in the editor --- mapeditor.cpp | 2 ++ textures.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/mapeditor.cpp b/mapeditor.cpp index fae1604e..29178df5 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -1060,6 +1060,8 @@ namespace mapeditor { displaymm('d', 8, 8+fs*7, 2, vid.fsize, XLAT("d = draw"), 0); displaymm('l', 8, 8+fs*8, 2, vid.fsize, XLAT("l = line"), 0); displaymm('c', 8, 8+fs*9, 2, vid.fsize, XLAT("c = circle"), 0); + int s = size(texture::config.data.pixels_to_draw); + if(s) displaymm(0, 8, 8+fs*11, 2, vid.fsize, its(s), 0); } #endif else { diff --git a/textures.cpp b/textures.cpp index e4754777..0e950d54 100644 --- a/textures.cpp +++ b/textures.cpp @@ -1269,6 +1269,7 @@ void fillpixel(int x, int y, unsigned col) { } void texture_data::undo() { + texture::config.data.pixels_to_draw.clear(); while(!undos.empty()) { auto p = undos.back(); undos.pop_back();