Changeset 374


Ignore:
Timestamp:
Apr 23, 2021, 1:48:45 PM (6 months ago)
Author:
chronos
Message:
  • Fixed: Still possible crash during change of partialy produced project in city screen.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Direct.pas

    r367 r374  
    5858//  p: pointer;
    5959  s: string;
    60 begin
     60Begin
    6161  case ID of
    6262    ntInitLocalHuman: begin
     
    6565      Info := Phrases.Lookup('BUSY_MODLH');
    6666      Show;
    67       {$IFDEF LINUX}
    68       // Force shown window repaint on Gtk2 widgetset
    69       Sleep(1);
    70       Application.ProcessMessages;
    71       {$ENDIF}
     67      Gtk2Fix;
    7268      Invalidate;
    7369      Update;
     
    198194
    199195procedure TDirectDlg.FormShow(Sender: TObject);
     196var
     197  I: Integer;
    200198begin
    201199  if not Gone then
  • trunk/LocalPlayer/CityScreen.pas

    r357 r374  
    14921492            (cpImp or cpIndex) then
    14931493          begin // loss of material -- do query
    1494             Application.ProcessMessages; // TODO: Needed for Gtk2, Lazarus gtk2 bug?
     1494            Gtk2Fix;
    14951495            if (pt1 = ptTrGoods) or (pt1 = ptShip) or (pt1 <> pt0) and
    14961496              (pt0 <> ptCaravan) then begin
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r352 r374  
    126126function ScaleFromNative(Value: Integer): Integer;
    127127procedure UnshareBitmap(Bitmap: TBitmap);
     128procedure Gtk2Fix;
    128129
    129130const
     
    16631664end;
    16641665
     1666procedure Gtk2Fix;
     1667var
     1668  I: Integer;
     1669begin
     1670  {$IFDEF LINUX}
     1671  // Wait and process messages little bit to avoid crash or force repaint under Gtk2
     1672  for I := 0 to 10 do begin
     1673    Sleep(1);
     1674    Application.ProcessMessages;
     1675  end;
     1676  {$ENDIF}
     1677end;
     1678
    16651679procedure LoadFonts;
    16661680var
Note: See TracChangeset for help on using the changeset viewer.