Changeset 70


Ignore:
Timestamp:
Jan 14, 2017, 10:42:14 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Slightly different behaviour of scrollbar under Linux and Windows.
  • Modified: Disable assert for city optimization to be able to play in Debug mode.
Location:
trunk/LocalPlayer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/ClientTools.pas

    r38 r70  
    570570          Done := true;
    571571          for cix := 0 to MyRO.nCity - 1 do
    572             if CityNeedsOptimize[cix] then
    573             begin
    574               OptiType := MyCity[cix].Status shr 4 and $0F;
    575               if OptiType <> 0 then
    576               begin
     572            if CityNeedsOptimize[cix] then begin
     573              OptiType := (MyCity[cix].Status shr 4) and $0F;
     574              if OptiType <> 0 then begin
    577575                Advice.ResourceWeights := OfferedResourceWeights[OptiType];
    578576                Server(sGetCityTileAdvice, me, cix, Advice);
    579577                if Advice.Tiles <> MyCity[cix].Tiles then
    580                   if CheckOnly then
    581                     assert(false)
    582                   else
    583                   begin
     578                  if CheckOnly then begin
     579                    // TODO: What is this assert for?
     580                    // Need to optimize city tiles but CheckOnly true?
     581                    //assert(false)
     582                  end else begin
    584583                    for fix := 1 to 26 do
    585584                      if MyCity[cix].Tiles and not Advice.Tiles and
  • trunk/LocalPlayer/PVSB.pas

    r69 r70  
    188188begin
    189189  ScrollBar.Min := si.nMin;
    190   ScrollBar.Max := Max(si.nMax - si.nPage + 1, 0);
     190  ScrollBar.Max := Max(si.nMax{$IFDEF LINUX} - si.nPage + 1{$ENDIF}, 0);
    191191  ScrollBar.PageSize := si.nPage;
    192192  ScrollBar.Position := si.nPos;
Note: See TracChangeset for help on using the changeset viewer.