fixed broken position of counter gadget to select level in editor
authorHolger Schemel <info@artsoft.org>
Tue, 12 Mar 2024 19:26:31 +0000 (20:26 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 12 Mar 2024 19:26:35 +0000 (20:26 +0100)
src/editor.c

index 6e24056011ad3e6ccc4e2e3f0a50fbf25dd87e90..6da69dfd85ad934a8276732078d6d44fe1ff3241 100644 (file)
@@ -8250,9 +8250,12 @@ static void MapCounterButtons(int id)
   ModifyEditorCounterValue(id, *counterbutton_info[id].value);
 
   // set position for counter gadgets with dynamically determined position
-  ModifyGadget(gi_down, GDI_Y, SY + ED_SETTINGS_Y(counterbutton_info[id].y), GDI_END);
-  ModifyGadget(gi_text, GDI_Y, SY + ED_SETTINGS_Y(counterbutton_info[id].y), GDI_END);
-  ModifyGadget(gi_up,   GDI_Y, SY + ED_SETTINGS_Y(counterbutton_info[id].y), GDI_END);
+  if (id != ED_COUNTER_ID_SELECT_LEVEL)
+  {
+    ModifyGadget(gi_down, GDI_Y, SY + ED_SETTINGS_Y(counterbutton_info[id].y), GDI_END);
+    ModifyGadget(gi_text, GDI_Y, SY + ED_SETTINGS_Y(counterbutton_info[id].y), GDI_END);
+    ModifyGadget(gi_up,   GDI_Y, SY + ED_SETTINGS_Y(counterbutton_info[id].y), GDI_END);
+  }
 
   // vertical position might have changed after setting position above
   y = gi_up->y + yoffset;