Browse Source

* Fix display refresh command.

git-svn-id: trunk@3770 -
daniel 19 years ago
parent
commit
06be3aba7d
2 changed files with 14 additions and 8 deletions
  1. 13 8
      fv/views.pas
  2. 1 0
      ide/fpide.pas

+ 13 - 8
fv/views.pas

@@ -855,7 +855,7 @@ const
   MouseUsesVideoBuf = false;
   MouseUsesVideoBuf = false;
 {$endif not UNIX}
 {$endif not UNIX}
 
 
-procedure DrawScreenBuf;
+procedure DrawScreenBuf(force:boolean);
 begin
 begin
   if (GetLockScreenCount=0) then
   if (GetLockScreenCount=0) then
    begin
    begin
@@ -868,7 +868,7 @@ begin
        end
        end
      else
      else
        HideMouse;
        HideMouse;
-     UpdateScreen(false);
+     UpdateScreen(force);
      If not MouseUsesVideoBuf then
      If not MouseUsesVideoBuf then
        ShowMouse;
        ShowMouse;
    end;
    end;
@@ -1430,7 +1430,7 @@ begin
      LockScreenUpdate; { don't update the screen yet }
      LockScreenUpdate; { don't update the screen yet }
      Draw;
      Draw;
      UnLockScreenUpdate;
      UnLockScreenUpdate;
-     DrawScreenBuf;
+     DrawScreenBuf(false);
      TView.DrawCursor;
      TView.DrawCursor;
    end;
    end;
 end;
 end;
@@ -2164,11 +2164,16 @@ end;
 
 
 
 
 {--TGroup-------------------------------------------------------------------}
 {--TGroup-------------------------------------------------------------------}
-{  ReDraw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 17Sep97 LdB              }
+{  ReDraw -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 2Jun06 DM              }
 {---------------------------------------------------------------------------}
 {---------------------------------------------------------------------------}
 procedure TGroup.Redraw;
 procedure TGroup.Redraw;
 begin
 begin
+  {Lock to prevent screen update.}
+  lockscreenupdate;
   DrawSubViews(First, nil);
   DrawSubViews(First, nil);
+  unlockscreenupdate;
+  {Draw all views at once, forced update.}
+  drawscreenbuf(true);
 end;
 end;
 
 
 
 
@@ -4341,7 +4346,7 @@ begin
       B[i]:=myChar;
       B[i]:=myChar;
      do_writeView(X,X+Count,Y,B);
      do_writeView(X,X+Count,Y,B);
    end;
    end;
-  DrawScreenBuf;
+  DrawScreenBuf(false);
 end;
 end;
 
 
 
 
@@ -4352,7 +4357,7 @@ begin
   if h>0 then
   if h>0 then
    for i:=0 to h-1 do
    for i:=0 to h-1 do
     do_writeView(x,x+w,y+i,buf);
     do_writeView(x,x+w,y+i,buf);
-  DrawScreenBuf;
+  DrawScreenBuf(false);
 end;
 end;
 
 
 
 
@@ -4370,10 +4375,10 @@ begin
      MyColor:=MapColor(Color);
      MyColor:=MapColor(Color);
      MyColor:=MyColor shl 8;
      MyColor:=MyColor shl 8;
      for i:=0 to l-1 do
      for i:=0 to l-1 do
-      B[i]:=MyColor+ord(Str[i+1]);
+       B[i]:=MyColor+ord(Str[i+1]);
      do_writeView(x,x+l,y,b);
      do_writeView(x,x+l,y,b);
    end;
    end;
-  DrawScreenBuf;
+  DrawScreenBuf(false);
 end;
 end;
 
 
 
 

+ 1 - 0
ide/fpide.pas

@@ -1064,6 +1064,7 @@ begin
   UpdatePrimaryFile;
   UpdatePrimaryFile;
   UpdateINIFile;
   UpdateINIFile;
   Message(Application,evBroadcast,cmCommandSetChanged,nil);
   Message(Application,evBroadcast,cmCommandSetChanged,nil);
+  application^.redraw;
 end;
 end;
 
 
 procedure TIDEApp.SourceWindowClosed;
 procedure TIDEApp.SourceWindowClosed;