From 3088b2ad63bc8b79672bdd13f6ddbcad24309f4f Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 1 Apr 2023 10:22:56 +0200 Subject: [PATCH] fixed showing special toolbox buttons for empty space elements in editor --- src/editor.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.34.1