changed handling "conf" and "properties" buttons in level editor
authorHolger Schemel <info@artsoft.org>
Thu, 29 Oct 2020 07:53:35 +0000 (08:53 +0100)
committerHolger Schemel <info@artsoft.org>
Thu, 29 Oct 2020 07:53:35 +0000 (08:53 +0100)
When clicking "conf" and "properties" buttons in the level editor when
the previous screen is not the playfield screen, it can be confusing
how to return to the playfield screen (by clicking both buttons in the
"right" order). To make things easier, both buttons now return to the
playfield screen if the user is already on the corresponding screen.

src/editor.c

index acd199d5f243ad147ef52a58d3b69dd523ec551f..086988438429ca414f8b1c73591498112a6007fc 100644 (file)
@@ -13806,7 +13806,7 @@ static void HandleControlButtons(struct GadgetInfo *gi)
       }
       else
       {
-       ChangeEditModeWindow(last_edit_mode);
+       ChangeEditModeWindow(ED_MODE_DRAWING);
 
        ClickOnGadget(level_editor_gadget[last_level_drawing_function],
                      MB_LEFTBUTTON);
@@ -13971,7 +13971,7 @@ static void HandleControlButtons(struct GadgetInfo *gi)
       }
       else
       {
-       ChangeEditModeWindow(last_edit_mode);
+       ChangeEditModeWindow(ED_MODE_DRAWING);
       }
       break;