mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 09:21:43 +01: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 | uses | ||||||
|   Classes, SysUtils, LCLProc, LResources, Forms, Controls, Dialogs, FileUtil, |   Classes, SysUtils, LCLProc, LResources, Forms, Controls, Dialogs, FileUtil, | ||||||
|   CodeCache, CodeToolManager, AVL_Tree, LazIDEIntf, |   CodeCache, CodeToolManager, AVL_Tree, | ||||||
|  |   LazIDEIntf, | ||||||
|   IDEProcs, LazarusIDEStrConsts, IDEDialogs; |   IDEProcs, LazarusIDEStrConsts, IDEDialogs; | ||||||
| 
 | 
 | ||||||
| type | type | ||||||
|  | |||||||
| @ -5424,6 +5424,7 @@ begin | |||||||
|     NewSrcEdit.EditorComponent.BeginUpdate; |     NewSrcEdit.EditorComponent.BeginUpdate; | ||||||
|     NewSrcEdit.CodeBuffer:=AnUnitInfo.Source; |     NewSrcEdit.CodeBuffer:=AnUnitInfo.Source; | ||||||
|     AnUnitInfo.ClearModifieds; |     AnUnitInfo.ClearModifieds; | ||||||
|  |     DebugLn(['TMainIDE.DoOpenFileInSourceEditor NewCaretXY=',dbgs(NewCaretXY),' NewTopLine=',NewTopLine]); | ||||||
|   end; |   end; | ||||||
| 
 | 
 | ||||||
|   // update editor indices in project |   // update editor indices in project | ||||||
| @ -5866,6 +5867,7 @@ var | |||||||
|   FilenameNoPath: String; |   FilenameNoPath: String; | ||||||
|   LoadBufferFlags: TLoadBufferFlags; |   LoadBufferFlags: TLoadBufferFlags; | ||||||
|   DiskFilename: String; |   DiskFilename: String; | ||||||
|  |   NewSrcEdit: TSourceEditor; | ||||||
| 
 | 
 | ||||||
|   function OpenResource: TModalResult; |   function OpenResource: TModalResult; | ||||||
|   begin |   begin | ||||||
| @ -6047,7 +6049,11 @@ begin | |||||||
|       if ofRevert in Flags then |       if ofRevert in Flags then | ||||||
|         Include(LoadBufferFlags,lbfRevert); |         Include(LoadBufferFlags,lbfRevert); | ||||||
|     end; |     end; | ||||||
|  |     NewSrcEdit:=SourceNotebook.FindSourceEditorWithPageIndex(PageIndex); | ||||||
|  |     if NewSrcEdit<>nil then DebugLn(['TMainIDE.DoOpenEditorFile AAA ',AFilename,' TopLine=',NewSrcEdit.EditorComponent.TopLine]); | ||||||
|     Result:=LoadCodeBuffer(NewBuf,AFileName,LoadBufferFlags); |     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 |     if Result<>mrOk then begin | ||||||
|       DebugLn(['TMainIDE.DoOpenEditorFile failed LoadCodeBuffer: ',AFilename]); |       DebugLn(['TMainIDE.DoOpenEditorFile failed LoadCodeBuffer: ',AFilename]); | ||||||
|       exit; |       exit; | ||||||
|  | |||||||
| @ -899,7 +899,7 @@ procedure TOICustomPropertyGrid.Notification(AComponent: TComponent; | |||||||
| var | var | ||||||
|   i: LongInt; |   i: LongInt; | ||||||
| begin | begin | ||||||
|   if Operation=opRemove then begin |   if (Operation=opRemove) and (FNotificationComponents<>nil) then begin | ||||||
|     FNotificationComponents.Remove(AComponent); |     FNotificationComponents.Remove(AComponent); | ||||||
|     i:=FSelection.IndexOf(AComponent); |     i:=FSelection.IndexOf(AComponent); | ||||||
|     if i>=0 then begin |     if i>=0 then begin | ||||||
|  | |||||||
| @ -2490,7 +2490,7 @@ begin | |||||||
|   Result:=mrOk; |   Result:=mrOk; | ||||||
|   if (OldFilename=NewFilename) then |   if (OldFilename=NewFilename) then | ||||||
|     exit; |     exit; | ||||||
|   debugln('TPkgManager.OnRenameFile A OldFilename="',OldFilename,'" New="',NewFilename,'"'); |   //debugln('TPkgManager.OnRenameFile A OldFilename="',OldFilename,'" New="',NewFilename,'"'); | ||||||
|   OldPkgFile:=PackageGraph.FindFileInAllPackages(OldFilename,false,true, |   OldPkgFile:=PackageGraph.FindFileInAllPackages(OldFilename,false,true, | ||||||
|                                                  not IsPartOfProject); |                                                  not IsPartOfProject); | ||||||
|   if (OldPkgFile=nil) or (OldPkgFile.LazPackage.ReadOnly) then |   if (OldPkgFile=nil) or (OldPkgFile.LazPackage.ReadOnly) then | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 mattias
						mattias