fixed setting selected editor tile size for MM style levels after playing
authorHolger Schemel <info@artsoft.org>
Thu, 16 Nov 2017 20:42:41 +0000 (21:42 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:16 +0000 (23:21 +0100)
src/editor.c

index 64192d85442df06acc93673ac38813d2452ab0de..c716bdae8d8dea9452f885036a85d5585fd57778 100644 (file)
@@ -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);