anchor.diff:  
     gGameCursor.MapEdForestAge := ForestAge.Position;
     gGameCursor.MapEdObjectsDensity := ForestDensity.Position;
  +end;
  +
  +
  +procedure TKMMapEdTerrainObjects.ObjectsChange(Sender: TObject);
  +var
  +  objIndex: Integer;
  +begin
  +
  +
  +  case TKMButtonFlat(Sender).Tag of
  +    OBJ_BLOCK_TAG,
  +    OBJ_NONE_TAG:  objIndex := TKMButtonFlat(Sender).Tag; // Block or Erase
  +    else           objIndex := ObjectsScroll.Position * 3 + TKMButtonFlat(Sender).Tag; //0..n-1
  +  end;
  +
  +  ObjectsUpdate(objIndex);
  +
  +  // Update Objects Palette scroll position
  +  if (objIndex <> OBJ_BLOCK_TAG) and (objIndex <> OBJ_NONE_TAG)
  +    and not InRange(objIndex,
  +                    Scroll_ObjectsPalette.Position*fObjPaletteTableSize.X,
  +                    Scroll_ObjectsPalette.Position*fObjPaletteTableSize.X + fObjPaletteTableSize.X*fObjPaletteTableSize.Y - 1) then
  +    Scroll_ObjectsPalette.Position := ((objIndex - 1) div fObjPaletteTableSize.X);
   end;
   
   
  
positive.code: 
      ObjectTypeSet[I] := TKMButtonFlat.Create(Panel_Objects, 9+BTN_BRUSH_SIZE*J, top + BTN_BRUSH_SIZE*K, 34, 34, rxIndex, rxTrees);
  
      ObjectTypeSet[I].OnClick := ObjectsChange;
      ObjectTypeSet[I].Hint := objectsHint;
    end;
  
  
negative.code:   CleanBrush := TKMButtonFlat.Create(Panel_Objects, 9, NextTop(45), 34, 34, 673, rxGui);
    CleanBrush.Anchors := [anTop];
    CleanBrush.Hint := gResTexts[TX_MAPED_OBJECTS_BRUSH_CLEAN];
    CleanBrush.OnClick := ObjectsBrushChange;
  
    rxIndex := 226;
  
  