From bdfe5693df0e5a9318bb7b0c8599426f2a47c127 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 25 Jan 1999 04:31:13 +0100 Subject: [PATCH] rnd-19990125-2 --- src/editor.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/editor.c b/src/editor.c index f8542695..2812b01e 100644 --- a/src/editor.c +++ b/src/editor.c @@ -4143,8 +4143,23 @@ static void HandleControlButtons(struct GadgetInfo *gi) break; default: + if (id >= GADGET_ID_ELEMENTLIST_FIRST && + id <= GADGET_ID_ELEMENTLIST_LAST) + { + int element_position = id - GADGET_ID_ELEMENTLIST_FIRST; + int new_element = editor_element[element_position + element_shift]; + + PickDrawingElement(button, new_element); + + if (!HAS_CONTENT(properties_element)) + { + properties_element = new_element; + if (edit_mode == ED_MODE_PROPERTIES) + DrawPropertiesWindow(); + } + } #ifdef DEBUG - if (gi->event.type == GD_EVENT_PRESSED) + else if (gi->event.type == GD_EVENT_PRESSED) printf("default: HandleControlButtons: GD_EVENT_PRESSED\n"); else if (gi->event.type == GD_EVENT_RELEASED) printf("default: HandleControlButtons: GD_EVENT_RELEASED\n"); -- 2.34.1