From: Holger Schemel Date: Thu, 16 Nov 2017 20:42:41 +0000 (+0100) Subject: fixed setting selected editor tile size for MM style levels after playing X-Git-Tag: 4.1.0.0~49 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b41bc999ca2fa20398e7ce513748bda2dd6afec4;p=rocksndiamonds.git fixed setting selected editor tile size for MM style levels after playing --- diff --git a/src/editor.c b/src/editor.c index 64192d85..c716bdae 100644 --- a/src/editor.c +++ b/src/editor.c @@ -8307,7 +8307,9 @@ static int getMaxEdFieldY(boolean has_scrollbar) void InitZoomLevelSettings(int zoom_tilesize) { - if (zoom_tilesize == -1) + static int last_game_engine_type = GAME_ENGINE_TYPE_UNKNOWN; + + if (zoom_tilesize == -1 && level.game_engine_type != last_game_engine_type) { ed_tilesize = setup.auto_setup.editor_zoom_tilesize; ed_tilesize_default = DEFAULT_EDITOR_TILESIZE; @@ -8319,6 +8321,8 @@ void InitZoomLevelSettings(int zoom_tilesize) } } + last_game_engine_type = level.game_engine_type; + // limit zoom tilesize by upper and lower bound ed_tilesize = MIN(MAX(MICRO_TILESIZE, ed_tilesize), TILESIZE);