fixed bug in editor with CEs using graphic of other element
authorHolger Schemel <info@artsoft.org>
Fri, 27 Dec 2019 15:55:32 +0000 (16:55 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 27 Dec 2019 15:55:32 +0000 (16:55 +0100)
This bug appeared when using "use graphic of element" and then
changing some other CE settings (like counters etc.), which caused
the custom graphics to be reset to the CEs default graphics.

src/editor.c

index c8444b1158c22f1acf52c5c0e94814e46f956be2..b99d33b774407537563726f03fe56b876f2d2247 100644 (file)
@@ -8325,6 +8325,9 @@ static void CopyCustomElementPropertiesToGame(int element)
   // copy change events also to special level editor variable
   custom_element = element_info[element];
   custom_element_change = *element_info[element].change;
+
+  // needed here to restore runtime value "element_info[element].gfx_element"
+  InitElementPropertiesGfxElement();
 }
 
 static void CopyGroupElementPropertiesToGame(int element)