IDE: fixed updating statusbar on source editor page change via keyboard, fixed typo

git-svn-id: trunk@13110 -
This commit is contained in:
mattias 2007-12-01 23:47:14 +00:00
parent 2261662fc3
commit cdde9e222b
4 changed files with 14 additions and 11 deletions

View File

@ -399,7 +399,7 @@ type
function ParentLevel: integer; function ParentLevel: integer;
function OnlyNonVisualPersistentsSelected: boolean; function OnlyNonVisualPersistentsSelected: boolean;
function OnlyVisualComponentsSelected: boolean; function OnlyVisualComponentsSelected: boolean;
function OnlyInvisiblePersistensSelected: boolean; function OnlyInvisiblePersistentsSelected: boolean;
function OnlyBoundLessComponentsSelected: boolean; function OnlyBoundLessComponentsSelected: boolean;
function LookupRootSelected: boolean; function LookupRootSelected: boolean;
@ -1121,6 +1121,7 @@ begin
if FControls.Count>=1 then begin if FControls.Count>=1 then begin
Items[0].GetFormRelativeBounds(FRealLeft,FRealTop,FRealWidth,FRealHeight, Items[0].GetFormRelativeBounds(FRealLeft,FRealTop,FRealWidth,FRealHeight,
true); true);
//DebugLn(['TControlSelection.UpdateRealBounds ',FRealLeft,',',FRealTop]);
for i:=1 to FControls.Count-1 do begin for i:=1 to FControls.Count-1 do begin
Items[i].GetFormRelativeBounds( Items[i].GetFormRelativeBounds(
NextRealLeft,NextRealTop,NextRealWidth,NextRealHeight,true); NextRealLeft,NextRealTop,NextRealWidth,NextRealHeight,true);
@ -2144,17 +2145,16 @@ var
RestoreBrush:=true; RestoreBrush:=true;
end; end;
DC.Canvas.FillRect(Rect(RLeft,RTop,RRight,RBottom)); DC.Canvas.FillRect(Rect(RLeft,RTop,RRight,RBottom));
//DC.Canvas.TextOut(RLeft,RTop,dbgs(ord(g)));
end; end;
begin begin
if (Count=0) or (FForm=nil) or LookupRootSelected if (Count=0) or (FForm=nil) or LookupRootSelected
or OnlyInvisiblePersistensSelected then exit; or OnlyInvisiblePersistentsSelected then exit;
Diff:=DC.FormOrigin; Diff:=DC.FormOrigin;
{writeln('[DrawGrabbers] ' //debugln(['[DrawGrabbers] ',' DC=',Diff.X,',',Diff.Y,' Grabber1=',FGrabbers[0].Left,',',FGrabbers[0].Top]);
,' DC=',Diff.X,',',Diff.Y
,' Grabber1=',FGrabbers[0].Left,',',FGrabbers[0].Top);}
RestoreBrush:=false; RestoreBrush:=false;
for g:=Low(TGrabIndex) to High(TGrabIndex) do for g:=Low(TGrabIndex) to High(TGrabIndex) do
@ -2499,7 +2499,7 @@ begin
Result:=cssOnlyVisualNeedsSelected in FStates; Result:=cssOnlyVisualNeedsSelected in FStates;
end; end;
function TControlSelection.OnlyInvisiblePersistensSelected: boolean; function TControlSelection.OnlyInvisiblePersistentsSelected: boolean;
var i: integer; var i: integer;
begin begin
if cssOnlyInvisibleNeedsUpdate in FStates then begin if cssOnlyInvisibleNeedsUpdate in FStates then begin

View File

@ -535,7 +535,7 @@ procedure TDesigner.SelectParentOfSelection;
var var
i: Integer; i: Integer;
begin begin
if ControlSelection.OnlyInvisiblePersistensSelected then exit; if ControlSelection.OnlyInvisiblePersistentsSelected then exit;
if ControlSelection.LookupRootSelected then begin if ControlSelection.LookupRootSelected then begin
SelectOnlyThisComponent(FLookupRoot); SelectOnlyThisComponent(FLookupRoot);
@ -670,7 +670,7 @@ var
begin begin
Result := false; Result := false;
if ControlSelection.Count = 0 then exit; if ControlSelection.Count = 0 then exit;
if ControlSelection.OnlyInvisiblePersistensSelected then exit; if ControlSelection.OnlyInvisiblePersistentsSelected then exit;
AllComponentsStream:=TMemoryStream.Create; AllComponentsStream:=TMemoryStream.Create;
try try
@ -1789,7 +1789,7 @@ Begin
Handled:=true; Handled:=true;
case TheMessage.CharCode of case TheMessage.CharCode of
VK_DELETE: VK_DELETE:
if not ControlSelection.OnlyInvisiblePersistensSelected then if not ControlSelection.OnlyInvisiblePersistentsSelected then
DoDeleteSelectedPersistents; DoDeleteSelectedPersistents;
VK_UP: VK_UP:
@ -2795,7 +2795,7 @@ begin
and (ControlSelection.SelectionForm=Form); and (ControlSelection.SelectionForm=Form);
LookupRootIsSelected:=ControlSelection.LookupRootSelected; LookupRootIsSelected:=ControlSelection.LookupRootSelected;
OnlyNonVisualsAreSelected := ControlSelection.OnlyNonVisualPersistentsSelected; OnlyNonVisualsAreSelected := ControlSelection.OnlyNonVisualPersistentsSelected;
SelectionVisible:=not ControlSelection.OnlyInvisiblePersistensSelected; SelectionVisible:=not ControlSelection.OnlyInvisiblePersistentsSelected;
CompsAreSelected:=ControlSelIsNotEmpty and SelectionVisible CompsAreSelected:=ControlSelIsNotEmpty and SelectionVisible
and not LookupRootIsSelected; and not LookupRootIsSelected;
OneControlSelected := ControlSelIsNotEmpty and ControlSelection[0].IsTControl; OneControlSelected := ControlSelIsNotEmpty and ControlSelection[0].IsTControl;

View File

@ -127,6 +127,7 @@ begin
end else begin end else begin
Result:=Parent.ClientOrigin; Result:=Parent.ClientOrigin;
FormOrigin:=ParentForm.ClientOrigin; FormOrigin:=ParentForm.ClientOrigin;
//DebugLn(['GetParentFormRelativeTopLeft Component=',dbgsName(Component),' Parent=',dbgsName(Parent),' ',dbgs(Result),' ParentForm=',dbgsName(ParentForm),' ',dbgs(FormOrigin)]);
Result.X:=Result.X-FormOrigin.X+TControl(Component).Left; Result.X:=Result.X-FormOrigin.X+TControl(Component).Left;
Result.Y:=Result.Y-FormOrigin.Y+TControl(Component).Top; Result.Y:=Result.Y-FormOrigin.Y+TControl(Component).Top;
end; end;

View File

@ -4363,6 +4363,7 @@ Begin
Notebook.PageIndex := Notebook.PageIndex+1 Notebook.PageIndex := Notebook.PageIndex+1
else else
NoteBook.PageIndex := 0; NoteBook.PageIndex := 0;
NotebookPageChanged(Self);
End; End;
Procedure TSourceNotebook.PrevEditor; Procedure TSourceNotebook.PrevEditor;
@ -4372,6 +4373,7 @@ Begin
Notebook.PageIndex := Notebook.PageIndex-1 Notebook.PageIndex := Notebook.PageIndex-1
else else
NoteBook.PageIndex := NoteBook.PageCount-1; NoteBook.PageIndex := NoteBook.PageCount-1;
NotebookPageChanged(Self);
End; End;
procedure TSourceNotebook.MoveEditor(OldPageIndex, NewPageIndex: integer); procedure TSourceNotebook.MoveEditor(OldPageIndex, NewPageIndex: integer);