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

Possible tiny logic error in fpg_edit #104

Open
devEric69 opened this issue Oct 6, 2020 · 0 comments
Open

Possible tiny logic error in fpg_edit #104

devEric69 opened this issue Oct 6, 2020 · 0 comments

Comments

@devEric69
Copy link

devEric69 commented Oct 6, 2020

Hello,

The status of the TPopupMenu Copy is set like this (right click in a TfpgEdit):

procedure SetDefaultPopupMenuItemsState;
...\...
else if itm.Name = ipmCopy then
        itm.Enabled := FSelOffset <> 0

Therefore, a char must be selected to enable the 'Copy' menu, to activate it. If it is Enabled, active, with 1 or several highlighted char (even in a TfpgEdit with ReadOnly=True), and if one clicks on this enabled TfpgPopupMenu 'Copy', then nothing is done because here is the called code:

procedure TfpgBaseEdit.DefaultPopupCopy(Sender: TObject);
begin
  if ReadOnly then // ??
    Exit; // ??
  CopyToClipboard;
end; 

said differently, we cannot copy into a readonly TfpgEdit.
Amo, the statement "if ReadOnly then Exit;" should be deleted.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant