From: Holger Schemel Date: Sat, 11 Mar 2017 16:34:34 +0000 (+0100) Subject: fixed updating editor element list for game engine when changing levels X-Git-Tag: 4.1.0.0~162 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d731ceaa9dedb27dd4928071e06a331c6d54953d;p=rocksndiamonds.git fixed updating editor element list for game engine when changing levels --- diff --git a/src/editor.c b/src/editor.c index 9b06a74e..3b6d092d 100644 --- a/src/editor.c +++ b/src/editor.c @@ -11895,6 +11895,8 @@ static void HandleCounterButtons(struct GadgetInfo *gi) if (counter_id == ED_COUNTER_ID_SELECT_LEVEL) { + int last_game_engine_type = level.game_engine_type; + LoadLevel(level_nr); LoadScore(level_nr); @@ -11905,6 +11907,13 @@ static void HandleCounterButtons(struct GadgetInfo *gi) ResetUndoBuffer(); DrawEditModeWindow(); + if (level.game_engine_type != last_game_engine_type) + { + /* update element selection list */ + ReinitializeElementList(); + ModifyEditorElementList(); + } + return; }