mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-24 03:42:35 +02:00
Designer: formatting
git-svn-id: trunk@39089 -
This commit is contained in:
parent
3570c3b2ff
commit
22c9f39a9c
@ -2069,8 +2069,7 @@ begin
|
||||
DoChange;
|
||||
end;
|
||||
|
||||
function TControlSelection.Equals(const ASelection: TPersistentSelectionList
|
||||
): boolean;
|
||||
function TControlSelection.Equals(const ASelection: TPersistentSelectionList): boolean;
|
||||
var
|
||||
i: Integer;
|
||||
Instance: TPersistent;
|
||||
|
||||
@ -1776,36 +1776,35 @@ begin
|
||||
CompIndex:=ControlSelection.IndexOf(MouseDownComponent);
|
||||
if ssCtrl in Shift then begin
|
||||
// child selection
|
||||
end else begin
|
||||
if (ssShift in Shift) then begin
|
||||
// shift key pressed (multiselection)
|
||||
end
|
||||
else if (ssShift in Shift) then begin
|
||||
// shift key pressed (multiselection)
|
||||
|
||||
if CompIndex<0 then begin
|
||||
// not selected
|
||||
// add component to selection
|
||||
if (ControlSelection.SelectionForm<>nil)
|
||||
and (ControlSelection.SelectionForm<>Form)
|
||||
then begin
|
||||
MessageDlg(lisInvalidMultiselection,
|
||||
fdInvalidMultiselectionText,
|
||||
mtInformation,[mbOk],0);
|
||||
end else begin
|
||||
ControlSelection.Add(MouseDownComponent);
|
||||
end;
|
||||
if CompIndex<0 then begin
|
||||
// not selected
|
||||
// add component to selection
|
||||
if (ControlSelection.SelectionForm<>nil)
|
||||
and (ControlSelection.SelectionForm<>Form)
|
||||
then begin
|
||||
MessageDlg(lisInvalidMultiselection,
|
||||
fdInvalidMultiselectionText,
|
||||
mtInformation,[mbOk],0);
|
||||
end else begin
|
||||
// remove from multiselection
|
||||
ControlSelection.Delete(CompIndex);
|
||||
ControlSelection.Add(MouseDownComponent);
|
||||
end;
|
||||
end else begin
|
||||
// no shift key (single selection or keeping multiselection)
|
||||
|
||||
if (CompIndex<0) then begin
|
||||
// select only this component
|
||||
ControlSelection.AssignPersistent(MouseDownComponent);
|
||||
end else
|
||||
// sync with the interface
|
||||
ControlSelection.UpdateBounds;
|
||||
// remove from multiselection
|
||||
ControlSelection.Delete(CompIndex);
|
||||
end;
|
||||
end else begin
|
||||
// no shift key (single selection or keeping multiselection)
|
||||
|
||||
if (CompIndex<0) then begin
|
||||
// select only this component
|
||||
ControlSelection.AssignPersistent(MouseDownComponent);
|
||||
end else
|
||||
// sync with the interface
|
||||
ControlSelection.UpdateBounds;
|
||||
end;
|
||||
end else begin
|
||||
// mouse down on grabber -> begin sizing
|
||||
|
||||
@ -9721,14 +9721,12 @@ begin
|
||||
UpdateIDEComponentPalette;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.OnGetDesignerSelection(
|
||||
const ASelection: TPersistentSelectionList);
|
||||
procedure TMainIDE.OnGetDesignerSelection(const ASelection: TPersistentSelectionList);
|
||||
begin
|
||||
if TheControlSelection=nil then exit;
|
||||
TheControlSelection.GetSelection(ASelection);
|
||||
end;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
procedure TMainIDE.UnitDependenciesViewAccessingSources(Sender: TObject);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user