mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 11:39:55 +02:00
Merge branch 'IDE/PjInsp/ReorderWarn' into 'main'
IDE/PjInsp: Display a warning that to change the order of items needs to disable alphabetical sorting See merge request freepascal.org/lazarus/lazarus!408
This commit is contained in:
commit
40d1f27a21
@ -2792,6 +2792,7 @@ resourcestring
|
|||||||
lisPLDOnlinePackagesCannotBeDeleted = 'Online packages cannot be deleted';
|
lisPLDOnlinePackagesCannotBeDeleted = 'Online packages cannot be deleted';
|
||||||
lisPESortFilesAlphabetically = 'Sort files alphabetically';
|
lisPESortFilesAlphabetically = 'Sort files alphabetically';
|
||||||
lisPEShowDirectoryHierarchy = 'Show directory hierarchy';
|
lisPEShowDirectoryHierarchy = 'Show directory hierarchy';
|
||||||
|
lisPEOffSortForReorder = 'To reorder items, disable alphabetical sorting';
|
||||||
lisPEShowPropsPanel = 'Show properties panel';
|
lisPEShowPropsPanel = 'Show properties panel';
|
||||||
lisClearFilter = 'Clear filter';
|
lisClearFilter = 'Clear filter';
|
||||||
dlgCaseSensitive = '&Case sensitive';
|
dlgCaseSensitive = '&Case sensitive';
|
||||||
|
@ -58,7 +58,7 @@ uses
|
|||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
// LCL
|
// LCL
|
||||||
LCLType, LCLIntf, LResources, Forms, Controls, Buttons, ComCtrls, Menus, Dialogs,
|
LCLType, LCLIntf, LResources, Forms, Controls, Buttons, ComCtrls, Menus, Dialogs,
|
||||||
ExtCtrls, StdCtrls, Graphics,
|
ExtCtrls, StdCtrls, Graphics, LCLStrConsts,
|
||||||
// LazControls
|
// LazControls
|
||||||
TreeFilterEdit,
|
TreeFilterEdit,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
@ -659,20 +659,36 @@ procedure TProjectInspectorForm.MoveDependencyUpClick(Sender: TObject);
|
|||||||
var
|
var
|
||||||
Dependency: TPkgDependency;
|
Dependency: TPkgDependency;
|
||||||
begin
|
begin
|
||||||
Dependency:=GetSingleSelectedDependency;
|
if SortAlphabetically then
|
||||||
if SortAlphabetically or (Dependency=nil) or Dependency.Removed
|
begin
|
||||||
or (Dependency.PrevRequiresDependency=nil) then exit;
|
IDEMessageDialog(rsMtWarning, lisPEOffSortForReorder, mtWarning, [mbOK]);
|
||||||
LazProject.MoveRequiredDependencyUp(Dependency);
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Dependency := GetSingleSelectedDependency;
|
||||||
|
if (Dependency = nil) or Dependency.Removed then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
if assigned(Dependency.PrevRequiresDependency) then
|
||||||
|
LazProject.MoveRequiredDependencyUp(Dependency);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectInspectorForm.MoveDependencyDownClick(Sender: TObject);
|
procedure TProjectInspectorForm.MoveDependencyDownClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
Dependency: TPkgDependency;
|
Dependency: TPkgDependency;
|
||||||
begin
|
begin
|
||||||
Dependency:=GetSingleSelectedDependency;
|
if SortAlphabetically then
|
||||||
if SortAlphabetically or (Dependency=nil) or Dependency.Removed
|
begin
|
||||||
or (Dependency.NextRequiresDependency=nil) then exit;
|
IDEMessageDialog(rsMtWarning, lisPEOffSortForReorder, mtWarning, [mbOK]);
|
||||||
LazProject.MoveRequiredDependencyDown(Dependency);
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Dependency := GetSingleSelectedDependency;
|
||||||
|
if (Dependency = nil) or Dependency.Removed then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
if assigned(Dependency.NextRequiresDependency) then
|
||||||
|
LazProject.MoveRequiredDependencyDown(Dependency);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectInspectorForm.PropsGroupBoxResize(Sender: TObject);
|
procedure TProjectInspectorForm.PropsGroupBoxResize(Sender: TObject);
|
||||||
|
Loading…
Reference in New Issue
Block a user