mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 11:01:20 +02:00
using default unitname if unable to parse the code
git-svn-id: trunk@7809 -
This commit is contained in:
parent
61d3cff9f6
commit
58e2d96223
@ -4350,6 +4350,7 @@ var
|
||||
NewAncestorName: String;
|
||||
APersistentClass: TPersistentClass;
|
||||
ACaption, AText: String;
|
||||
NewUnitName: String;
|
||||
begin
|
||||
// check installed packages
|
||||
debugln('TMainIDE.DoLoadLFM A ',AnUnitInfo.Filename,' ',dbgs(AnUnitInfo.IsPartOfProject),' ');
|
||||
@ -4446,9 +4447,12 @@ begin
|
||||
if not (ofProjectLoading in Flags) then FormEditor1.ClearSelection;
|
||||
|
||||
// create JIT component
|
||||
NewUnitName:=AnUnitInfo.UnitName;
|
||||
if NewUnitName='' then
|
||||
NewUnitName:=ExtractFileNameOnly(AnUnitInfo.Filename);
|
||||
CInterface := TComponentInterface(
|
||||
FormEditor1.CreateComponentFromStream(BinLFMStream,
|
||||
AncestorType,copy(AnUnitInfo.UnitName,1,255),true));
|
||||
AncestorType,copy(NewUnitName,1,255),true));
|
||||
if CInterface=nil then begin
|
||||
// error streaming component -> examine lfm file
|
||||
DebugLn('ERROR: streaming failed lfm="',LFMBuf.Filename,'"');
|
||||
|
Loading…
Reference in New Issue
Block a user