anchor.diff:      if mc=m then
       begin
   
  -      FMap.CurrentLevelIndex := M.Tag;
  -      FSelectedObject := nil;
  -      InvalidateMapDimensions;
  -      InvalidateMapContent;
  -
  +      DoSetMapLevelIndex(M.Tag);
         mc.Checked := True;
       end
       else begin
  
positive.code: 
      procedure MapChanded;
  
      procedure PaintAxis(Kind: TAxisKind; Axis: TPaintBox);
  
      procedure RenderCursor;
  
negative.code:   SetupLevelSelection;
  end;
  
  procedure TfMain.DoSetMapLevelIndex(ANewIndex: Integer);
  begin
    FMap.CurrentLevelIndex := ANewIndex;
    FSelectedObject := nil;
    InvalidateMapDimensions;
    InvalidateMapContent;
  end;
  
  procedure TfMain.DoMapLevelWheelScroll(Shift: TShiftState; WheelDelta: Integer);
  var
    direction : Integer;
  
    old_level, new_level: integer;
  begin
    direction:= - Sign(WheelDelta);
  
    old_level := FMap.CurrentLevelIndex;
  
    new_level := old_level + direction;
  
    if (new_level >=0) and (new_level < FMap.MapLevels.Count) then
    begin
      DoSetMapLevelIndex(new_level);
    end;
  end;
  
  procedure TfMain.DoMapViewWheelScroll(sb: TScrollBar; Shift: TShiftState;
    WheelDelta: Integer; MousePos: TPoint);
  begin
    sb.Position := sb.Position - Sign(WheelDelta) * 3;
  
    sb.Position := Min(sb.Max-sb.PageSize+1,sb.Position);
  
    if ssShift in Shift then
    begin
      FMapHPos := sb.Position;
    end
    else begin
      FMapVPos := sb.Position;
    end;
  
    SetMapViewMouse(MousePos.x,MousePos.Y);
  
    InvalidateMapAxis;
  
  end;
  
  procedure TfMain.MapViewClick(Sender: TObject);
  begin
    //FActiveBrush.TileClicked(FMouseTileX, FMouseTileY);
  