rnd-20070916-1-src
[rocksndiamonds.git] / src / editor.c
index d9567731dc917532aaa6e6902aac7171e10ee579..38af449cea7298ab48d53438bbf56a515beca7ec 100644 (file)
@@ -7066,6 +7066,12 @@ void DrawLevelEd()
   BlitBitmap(drawto, bitmap_db_door,
             DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
 
+#if 1
+  /* draw new control window (with border) to window */
+  redraw_mask |= REDRAW_ALL;
+  BackToFront();
+#endif
+
   OpenDoor(DOOR_OPEN_1);
 }
 
@@ -7318,7 +7324,7 @@ static void DrawDrawingWindow()
   stick_element_properties_window = FALSE;
 
   SetMainBackgroundImage(IMG_UNDEFINED);
-  ClearWindow();
+  ClearField();
 
   UnmapLevelEditorWindowGadgets();
   UnmapLevelEditorToolboxCustomGadgets();
@@ -7341,7 +7347,7 @@ static void DrawLevelInfoWindow()
   stick_element_properties_window = FALSE;
 
   SetMainBackgroundImage(IMG_BACKGROUND_EDITOR);
-  ClearWindow();
+  ClearField();
   UnmapLevelEditorWindowGadgets();
 
 #if 0
@@ -8311,7 +8317,7 @@ static void DrawPropertiesWindow()
     MapLevelEditorToolboxCustomGadgets();
 
   SetMainBackgroundImage(IMG_BACKGROUND_EDITOR);
-  ClearWindow();
+  ClearField();
 
 #if 0
   DrawTextSCentered(ED_SETTINGS1_YPOS, FONT_TITLE_1, "Element Settings");
@@ -10294,7 +10300,10 @@ static void HandleCounterButtons(struct GadgetInfo *gi)
   if (counter_id == ED_COUNTER_ID_SELECT_LEVEL)
   {
       LoadLevel(level_nr);
+      LoadScore(level_nr);
+
       TapeErase();
+
       ResetUndoBuffer();
       DrawEditModeWindow();