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. // The other components are done at the end via GlobalFixupReferences.
// So, there is nothing left to do here. // So, there is nothing left to do here.
Result := nil; 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)); //DebugLn(dbgsName(CurReadJITComponent), ' FIND global component ', AName, ' ', dbgsName(Result));
end; end;

View File

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

View File

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