Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving keyboard-based working #745

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Source/ExifToolsGui_ValEdit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ TValueListEditor = class(Vcl.ValEdit.TValueListEditor)
procedure TopLeftChanged; override;
public
constructor Create(AOwner: TComponent); override;
procedure SetFocus; override;
property OnCtrlKeyDown: TkeyEvent read FOnCtrlKeyDown write FOnCtrlKeyDown;
property ProportionalVScroll: boolean read FProportionalVScroll write SetProportionalVScroll default false;
property FixedRows;
Expand Down Expand Up @@ -250,4 +251,10 @@ procedure TValueListEditor.TopLeftChanged;
SetScrollPos(Self.Handle, SB_VERT, TopRow, true);
end;

procedure TValueListEditor.SetFocus;
begin
if CanFocus then
inherited SetFocus;
end;

end.
10 changes: 7 additions & 3 deletions Source/Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3779,22 +3779,26 @@ procedure TFMain.ShowMetadata;
ETResult: TStringList;
NoChars: TSysCharSet;
begin
// Saved position?
SavedRow := MetadataList.Tag;
if (SavedRow < 1) then
SavedRow := MetadataList.Row;
MetadataList.Tag := -1; // Reset hint row

MetadataList.Strings.Clear;
SavedRow := MetadataList.Row;
MetadataList.Row := 1;

Item := GetSelectedFile(ShellList.RelFileName);
SetCaption(Item);
if (Item = '') then
begin
MetadataList.Enabled := false;
MetadataList.Strings.Add('-');
MetadataList.ItemProps[0].ReadOnly := true;
EditQuick.Text := '';
MemoQuick.Text := '';
exit;
end;

MetadataList.Enabled := true;
MetadataLoading := true;
ETResult := TStringList.Create;
try
Expand Down