From: Holger Schemel Date: Sat, 1 Apr 2023 08:22:56 +0000 (+0200) Subject: fixed showing special toolbox buttons for empty space elements in editor X-Git-Tag: 4.3.5.3~4 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=3088b2ad63bc8b79672bdd13f6ddbcad24309f4f fixed showing special toolbox buttons for empty space elements in editor --- diff --git a/src/editor.c b/src/editor.c index 41bb5d88..4f29f028 100644 --- a/src/editor.c +++ b/src/editor.c @@ -8181,6 +8181,12 @@ static boolean CopyCustomElement(int element_old, int element_new, return FALSE; } + else if (IS_EMPTY_ELEMENT(element_old) && !IS_EMPTY_ELEMENT(element_new)) + { + Request("Please choose empty element!", REQ_CONFIRM); + + return FALSE; + } else { level.changed = TRUE; @@ -10677,7 +10683,8 @@ static void DrawPropertiesWindow(void) UnmapLevelEditorToolboxCustomGadgets(); if (IS_CUSTOM_ELEMENT(properties_element) || - IS_GROUP_ELEMENT(properties_element)) + IS_GROUP_ELEMENT(properties_element) || + IS_EMPTY_ELEMENT(properties_element)) MapLevelEditorToolboxCustomGadgets(); SetMainBackgroundImage(IMG_BACKGROUND_EDITOR);