rnd-20030127-1-src
[rocksndiamonds.git] / src / editor.c
index 688a63b7945d8650c328f2582e849a07d26e2fd1..c760e12da1a79a9e6a159934793e56211fd77568 100644 (file)
@@ -1563,13 +1563,22 @@ static void ReinitializeElementListButtons()
 
 static char *getElementInfoText(int element)
 {
-  char *info_text = "unknown";
+  char *info_text = NULL;
+
+  if (element < NUM_FILE_ELEMENTS)
+  {
+    if (element_info[element].custom_description != NULL)
+      info_text = element_info[element].custom_description;
+    else if (element_info[element].editor_description != NULL)
+      info_text = element_info[element].editor_description;
+  }
+
+  if (info_text == NULL)
+  {
+    info_text = "unknown";
 
-  if (element < NUM_FILE_ELEMENTS &&
-      element_info[element].editor_description != NULL)
-    info_text = element_info[element].editor_description;
-  else
     Error(ERR_WARN, "no element description for element %d", element);
+  }
 
   return info_text;
 }
@@ -4342,22 +4351,11 @@ void HandleLevelEditorIdle()
   if (!DelayReached(&action_delay, action_delay_value))
     return;
 
-#if 1
-
   DrawGraphicAnimationExt(drawto,
                          SX + xpos * TILEX,
                          SY + ypos * TILEY + MINI_TILEY / 2,
                          el2img(properties_element), -1, NO_MASKING);
 
-#else
-  DrawGraphicAnimationExt(drawto,
-                         SX + xpos * TILEX,
-                         SY + ypos * TILEY + MINI_TILEY / 2,
-                         el_dir_act2img(properties_element,
-                                        MV_NO_MOVING,
-                                        ...), -1, NO_MASKING);
-#endif
-
   MarkTileDirty(xpos, ypos);
   MarkTileDirty(xpos, ypos + 1);