X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;fp=src%2Feditor.c;h=edd8b12f224f50c3dc0f07097b0ccd34bd6d2c94;hp=4f29f028a7bc245c1b3abb4222aae4095c0f6be2;hb=ce7a1e6952d05d6eecdae03ea3110f8ca6807cb3;hpb=3088b2ad63bc8b79672bdd13f6ddbcad24309f4f diff --git a/src/editor.c b/src/editor.c index 4f29f028..edd8b12f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -7759,6 +7759,14 @@ static void MapLevelEditorToolboxCustomGadgets(void) MapOrUnmapLevelEditorToolboxCustomGadgets(TRUE); } +static void MapLevelEditorToolboxCustomGadgetsIfNeeded(void) +{ + if (IS_CUSTOM_ELEMENT(properties_element) || + IS_GROUP_ELEMENT(properties_element) || + IS_EMPTY_ELEMENT(properties_element)) + MapLevelEditorToolboxCustomGadgets(); +} + static void UnmapLevelEditorToolboxCustomGadgets(void) { MapOrUnmapLevelEditorToolboxCustomGadgets(FALSE); @@ -10682,10 +10690,7 @@ static void DrawPropertiesWindow(void) UnmapLevelEditorToolboxDrawingGadgets(); UnmapLevelEditorToolboxCustomGadgets(); - if (IS_CUSTOM_ELEMENT(properties_element) || - IS_GROUP_ELEMENT(properties_element) || - IS_EMPTY_ELEMENT(properties_element)) - MapLevelEditorToolboxCustomGadgets(); + MapLevelEditorToolboxCustomGadgetsIfNeeded(); SetMainBackgroundImage(IMG_BACKGROUND_EDITOR); ClearField();