mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 00:30:25 +02:00
MG: fixed rubberband
git-svn-id: trunk@3301 -
This commit is contained in:
parent
64d87305f7
commit
0ea1689254
@ -463,6 +463,8 @@ begin
|
|||||||
NewPageIndex:=AMenuItem.MenuIndex;
|
NewPageIndex:=AMenuItem.MenuIndex;
|
||||||
if (NewPageIndex<0) or (NewPageIndex>=Notebook.PageCount) then exit;
|
if (NewPageIndex<0) or (NewPageIndex>=Notebook.PageCount) then exit;
|
||||||
NoteBook.PageIndex:=NewPageIndex;
|
NoteBook.PageIndex:=NewPageIndex;
|
||||||
|
GetDesigner.SelectOnlyThisComponent(
|
||||||
|
TPage(NoteBook.PageList[NoteBook.PageIndex]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TNotebookComponentEditor.AddNewPageToDesigner(Index: integer);
|
procedure TNotebookComponentEditor.AddNewPageToDesigner(Index: integer);
|
||||||
|
@ -548,7 +548,6 @@ end;
|
|||||||
|
|
||||||
procedure TControlSelection.UpdateBounds;
|
procedure TControlSelection.UpdateBounds;
|
||||||
begin
|
begin
|
||||||
if IsResizing then exit;
|
|
||||||
if FUpdateLock>0 then begin
|
if FUpdateLock>0 then begin
|
||||||
Include(FStates,cssBoundsNeedsUpdate);
|
Include(FStates,cssBoundsNeedsUpdate);
|
||||||
exit;
|
exit;
|
||||||
@ -1118,10 +1117,10 @@ begin
|
|||||||
Result:=FControls.Add(NewSelectedControl);
|
Result:=FControls.Add(NewSelectedControl);
|
||||||
FStates:=FStates+[cssOnlyNonVisualNeedsUpdate,cssOnlyVisualNeedsUpdate];
|
FStates:=FStates+[cssOnlyNonVisualNeedsUpdate,cssOnlyVisualNeedsUpdate];
|
||||||
if Count=1 then SetCustomForm;
|
if Count=1 then SetCustomForm;
|
||||||
|
DoChange;
|
||||||
UpdateBounds;
|
UpdateBounds;
|
||||||
SaveBounds;
|
SaveBounds;
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
DoChange;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TControlSelection.AssignComponent(AComponent: TComponent): boolean;
|
function TControlSelection.AssignComponent(AComponent: TComponent): boolean;
|
||||||
@ -1145,6 +1144,7 @@ end;
|
|||||||
procedure TControlSelection.Delete(Index:integer);
|
procedure TControlSelection.Delete(Index:integer);
|
||||||
begin
|
begin
|
||||||
if Index<0 then exit;
|
if Index<0 then exit;
|
||||||
|
BeginUpdate;
|
||||||
Items[Index].Free;
|
Items[Index].Free;
|
||||||
FControls.Delete(Index);
|
FControls.Delete(Index);
|
||||||
FStates:=FStates+[cssOnlyNonVisualNeedsUpdate,cssOnlyVisualNeedsUpdate];
|
FStates:=FStates+[cssOnlyNonVisualNeedsUpdate,cssOnlyVisualNeedsUpdate];
|
||||||
@ -1152,6 +1152,7 @@ begin
|
|||||||
UpdateBounds;
|
UpdateBounds;
|
||||||
SaveBounds;
|
SaveBounds;
|
||||||
DoChange;
|
DoChange;
|
||||||
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TControlSelection.Clear;
|
procedure TControlSelection.Clear;
|
||||||
@ -1450,6 +1451,10 @@ var i:integer;
|
|||||||
begin
|
begin
|
||||||
SelectionChanged:=false;
|
SelectionChanged:=false;
|
||||||
if ClearBefore then begin
|
if ClearBefore then begin
|
||||||
|
if IsSelected(ACustomForm) then begin
|
||||||
|
Remove(ACustomForm);
|
||||||
|
SelectionChanged:=true;
|
||||||
|
end;
|
||||||
for i:=0 to ACustomForm.ComponentCount-1 do
|
for i:=0 to ACustomForm.ComponentCount-1 do
|
||||||
if not ControlInRubberBand(ACustomForm.Components[i]) then begin
|
if not ControlInRubberBand(ACustomForm.Components[i]) then begin
|
||||||
if IsSelected(ACustomForm.Components[i]) then begin
|
if IsSelected(ACustomForm.Components[i]) then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user