mirror of https://gitlab.com/basile.b/dexed.git
win, prevent two cases of case sensitive fname comparison
This commit is contained in:
parent
48b6a258a5
commit
ff7bd9fcb2
|
@ -481,7 +481,7 @@ begin
|
||||||
for i := 0 to PageControl.PageCount-1 do
|
for i := 0 to PageControl.PageCount-1 do
|
||||||
begin
|
begin
|
||||||
result := getDocument(i);
|
result := getDocument(i);
|
||||||
if result.fileName = fname then
|
if SameFileName(result.fileName, fname) then
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
result := nil;
|
result := nil;
|
||||||
|
|
|
@ -27,7 +27,7 @@ type
|
||||||
published
|
published
|
||||||
property maxCount: Integer read fMaxCount write setMaxCount;
|
property maxCount: Integer read fMaxCount write setMaxCount;
|
||||||
public
|
public
|
||||||
constructor Create; virtual;
|
constructor create; virtual;
|
||||||
procedure Insert(index: Integer; const value: string); override;
|
procedure Insert(index: Integer; const value: string); override;
|
||||||
property objectTag: TObject read fObj write fObj;
|
property objectTag: TObject read fObj write fObj;
|
||||||
end;
|
end;
|
||||||
|
@ -39,6 +39,7 @@ type
|
||||||
protected
|
protected
|
||||||
function checkItem(const value: string): boolean; override;
|
function checkItem(const value: string): boolean; override;
|
||||||
public
|
public
|
||||||
|
constructor create; override;
|
||||||
procedure assign(source: TPersistent); override;
|
procedure assign(source: TPersistent); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ end;
|
||||||
|
|
||||||
function TCEMruList.checkItem(const value: string): boolean;
|
function TCEMruList.checkItem(const value: string): boolean;
|
||||||
var
|
var
|
||||||
i: NativeInt;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
i := indexOf(value);
|
i := indexOf(value);
|
||||||
if i = -1 then
|
if i = -1 then
|
||||||
|
@ -143,6 +144,14 @@ begin
|
||||||
clearOutOfRange;
|
clearOutOfRange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TCEMRUFileList.create;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
|
CaseSensitive := true;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEMRUFileList.assign(source: TPersistent);
|
procedure TCEMRUFileList.assign(source: TPersistent);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
@ -224,8 +233,9 @@ procedure TCEMRUProjectList.projClosing(project: ICECommonProject);
|
||||||
var
|
var
|
||||||
fname: string;
|
fname: string;
|
||||||
begin
|
begin
|
||||||
if project = nil then exit;
|
if project = nil then
|
||||||
//
|
exit;
|
||||||
|
|
||||||
fname := project.filename;
|
fname := project.filename;
|
||||||
if fname.fileExists then
|
if fname.fileExists then
|
||||||
Insert(0, fname);
|
Insert(0, fname);
|
||||||
|
|
Loading…
Reference in New Issue