IDE: fixing up global designer references

git-svn-id: trunk@14839 -
This commit is contained in:
mattias 2008-04-15 18:28:17 +00:00
parent 91532eaa76
commit d6163d5518
3 changed files with 16 additions and 4 deletions

View File

@ -814,6 +814,9 @@ begin
// The other components are done at the end via GlobalFixupReferences.
// So, there is nothing left to do here.
Result := nil;
{$IFDEF EnableMultiFormProperties}
//DebugLn('TJITComponentList.OnFindGlobalComponent Root=',dbgsName(CurReadJITComponent), ' Name=', AName, ' Result=', dbgsName(Result));
{$ENDIF}
//DebugLn(dbgsName(CurReadJITComponent), ' FIND global component ', AName, ' ', dbgsName(Result));
end;

View File

@ -5645,16 +5645,18 @@ begin
RefRootName:=ReferenceRootNames[i];
ReferenceInstanceNames.Clear;
GetFixupInstanceNames(CurRoot,RefRootName,ReferenceInstanceNames);
//DebugLn(['TMainIDE.DoFixupComponentReferences ',i,' ',dbgsName(CurRoot),' RefRoot=',RefRootName,' Refs="',Trim(ReferenceInstanceNames.Text),'"']);
{$IFDEF EnableMultiFormProperties}
DebugLn(['TMainIDE.DoFixupComponentReferences BEFORE loading ',i,' ',dbgsName(CurRoot),' RefRoot=',RefRootName,' Refs="',Trim(ReferenceInstanceNames.Text),'"']);
// load the referenced component
Result:=LoadDependencyHidden(RefRootName);
{$ENDIF}
GlobalFixupReferences;
ReferenceInstanceNames.Clear;
GetFixupInstanceNames(CurRoot,RefRootName,ReferenceInstanceNames);
//DebugLn(['TMainIDE.DoFixupComponentReferences AAA2 ',i,' ',dbgsName(CurRoot),' RefRoot=',RefRootName,' Refs="',Trim(ReferenceInstanceNames.Text),'"']);
DebugLn(['TMainIDE.DoFixupComponentReferences AFTER loading ',i,' ',dbgsName(CurRoot),' RefRoot=',RefRootName,' Refs="',Trim(ReferenceInstanceNames.Text),'"']);
// forget the rest of the dangling references
RemoveFixupReferences(CurRoot,RefRootName);
@ -5665,6 +5667,8 @@ begin
// b) undo the opening (close the designer forms)
end;
end;
finally
ReferenceRootNames.Free;
ReferenceInstanceNames.Free;

View File

@ -4124,9 +4124,14 @@ begin
end;
function TComponentPropertyEditor.AllEqual: Boolean;
var
AComponent: TComponent;
begin
Result:=(inherited AllEqual)
and (FindRootDesigner(GetComponentReference)<>nil);
Result:=false;
if not (inherited AllEqual) then exit;
AComponent:=GetComponentReference;
if AComponent=nil then exit;
Result:=csDesigning in AComponent.ComponentState;
end;