projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3088b2a
)
moved code to separate function
author
Holger Schemel
<info@artsoft.org>
Sat, 1 Apr 2023 10:07:33 +0000
(12:07 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sat, 1 Apr 2023 10:07:33 +0000
(12:07 +0200)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index 4f29f028a7bc245c1b3abb4222aae4095c0f6be2..edd8b12f224f50c3dc0f07097b0ccd34bd6d2c94 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-7759,6
+7759,14
@@
static void MapLevelEditorToolboxCustomGadgets(void)
MapOrUnmapLevelEditorToolboxCustomGadgets(TRUE);
}
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);
static void UnmapLevelEditorToolboxCustomGadgets(void)
{
MapOrUnmapLevelEditorToolboxCustomGadgets(FALSE);
@@
-10682,10
+10690,7
@@
static void DrawPropertiesWindow(void)
UnmapLevelEditorToolboxDrawingGadgets();
UnmapLevelEditorToolboxCustomGadgets();
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();
SetMainBackgroundImage(IMG_BACKGROUND_EDITOR);
ClearField();