mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:22:30 +02:00
fixed closing an empty TTIPropertyGrid
git-svn-id: trunk@9866 -
This commit is contained in:
parent
50d7aaf797
commit
ef77b40e9f
@ -38,7 +38,8 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LResources, Forms, Controls, Dialogs, FileUtil,
|
||||
CodeCache, CodeToolManager, AVL_Tree, LazIDEIntf,
|
||||
CodeCache, CodeToolManager, AVL_Tree,
|
||||
LazIDEIntf,
|
||||
IDEProcs, LazarusIDEStrConsts, IDEDialogs;
|
||||
|
||||
type
|
||||
|
@ -5424,6 +5424,7 @@ begin
|
||||
NewSrcEdit.EditorComponent.BeginUpdate;
|
||||
NewSrcEdit.CodeBuffer:=AnUnitInfo.Source;
|
||||
AnUnitInfo.ClearModifieds;
|
||||
DebugLn(['TMainIDE.DoOpenFileInSourceEditor NewCaretXY=',dbgs(NewCaretXY),' NewTopLine=',NewTopLine]);
|
||||
end;
|
||||
|
||||
// update editor indices in project
|
||||
@ -5866,6 +5867,7 @@ var
|
||||
FilenameNoPath: String;
|
||||
LoadBufferFlags: TLoadBufferFlags;
|
||||
DiskFilename: String;
|
||||
NewSrcEdit: TSourceEditor;
|
||||
|
||||
function OpenResource: TModalResult;
|
||||
begin
|
||||
@ -6047,7 +6049,11 @@ begin
|
||||
if ofRevert in Flags then
|
||||
Include(LoadBufferFlags,lbfRevert);
|
||||
end;
|
||||
NewSrcEdit:=SourceNotebook.FindSourceEditorWithPageIndex(PageIndex);
|
||||
if NewSrcEdit<>nil then DebugLn(['TMainIDE.DoOpenEditorFile AAA ',AFilename,' TopLine=',NewSrcEdit.EditorComponent.TopLine]);
|
||||
Result:=LoadCodeBuffer(NewBuf,AFileName,LoadBufferFlags);
|
||||
NewSrcEdit:=SourceNotebook.FindSourceEditorWithPageIndex(PageIndex);
|
||||
if NewSrcEdit<>nil then DebugLn(['TMainIDE.DoOpenEditorFile BBB ',AFilename,' TopLine=',NewSrcEdit.EditorComponent.TopLine]);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn(['TMainIDE.DoOpenEditorFile failed LoadCodeBuffer: ',AFilename]);
|
||||
exit;
|
||||
|
@ -2108,9 +2108,9 @@ procedure TSourceEditor.OnCodeBufferChanged(Sender: TSourceLog;
|
||||
|
||||
var StartPos, EndPos, MoveToPos: TPoint;
|
||||
begin
|
||||
{$IFDEF IDE_DEBUG}
|
||||
writeln('[TSourceEditor.OnCodeBufferChanged] A ',FIgnoreCodeBufferLock,' ',SrcLogEntry<>nil);
|
||||
{$ENDIF}
|
||||
{ $IFDEF IDE_DEBUG}
|
||||
writeln('[TSourceEditor.OnCodeBufferChanged] A ',FIgnoreCodeBufferLock,' ',SrcLogEntry<>nil);
|
||||
{ $ENDIF}
|
||||
if FIgnoreCodeBufferLock>0 then exit;
|
||||
if SrcLogEntry<>nil then begin
|
||||
FEditor.BeginUpdate;
|
||||
|
@ -899,7 +899,7 @@ procedure TOICustomPropertyGrid.Notification(AComponent: TComponent;
|
||||
var
|
||||
i: LongInt;
|
||||
begin
|
||||
if Operation=opRemove then begin
|
||||
if (Operation=opRemove) and (FNotificationComponents<>nil) then begin
|
||||
FNotificationComponents.Remove(AComponent);
|
||||
i:=FSelection.IndexOf(AComponent);
|
||||
if i>=0 then begin
|
||||
|
@ -2490,7 +2490,7 @@ begin
|
||||
Result:=mrOk;
|
||||
if (OldFilename=NewFilename) then
|
||||
exit;
|
||||
debugln('TPkgManager.OnRenameFile A OldFilename="',OldFilename,'" New="',NewFilename,'"');
|
||||
//debugln('TPkgManager.OnRenameFile A OldFilename="',OldFilename,'" New="',NewFilename,'"');
|
||||
OldPkgFile:=PackageGraph.FindFileInAllPackages(OldFilename,false,true,
|
||||
not IsPartOfProject);
|
||||
if (OldPkgFile=nil) or (OldPkgFile.LazPackage.ReadOnly) then
|
||||
|
Loading…
Reference in New Issue
Block a user