tcobbs/ldview

Errors & Warnings copy-to-clipboard does not copy to the clipboard

Closed this issue · 2 comments

Describe the bug
Clicking the Errors & Warnings copy-to-clipboard button does not copy anything to the clipboard as pasting (or ctrl+v) does not paste the contents from the Errors & Warnings dialog.

To Reproduce
Steps to reproduce the behavior (On Windows):

  1. Open a file with known errors and or warnings
  2. The Errors & Warnings dialog should automatically present but if it does not, select Tools->Errors & Warnings... (Ctrl+Shift+E) from menu actions.
  3. Click 'Copy Error to Clipboard'
  4. Open Notepad or any other text editor and enter (ctrl+v) or 'paste' if this menu action is enabled.
  5. The contents of the Errors & Warnings dialog are not pasted as expected.

Expected behavior
The contents of the Errors & Warnings dialog should be pasted into the text editor

Screenshots
LDView_About

LDView_Errors_Copy_To_Clipboard

Platform:

  • OS: Windows
  • Version 11
  • CPU Architecture X86-64

Additional context
Using latest version of LDView from GitHub releases

Cheers,

tcobbs commented

@trevorsandy I cannot reproduce the problem when following your exact steps. However, I believe that you are in a state where no item in the list is selected. While it is impossible to deselect once there is a selection, other actions can make it so that no item is selected. I believe that you are in such a state.

I pushed a commit to disable the "Copy Error to Clipboard" button when no item is selected:

4f75ac9

The above change also makes it so that the selection is shown even when the focus is on another control (which happens when you push the button). Before I changed it to do this, there was no way to know what was selected when the tree view wasn't focused. (Consequently, I can't tell by your screenshot if there is a selection or not.) I'm hoping that your tree view did not have a selected item, and that was the source of the problem. Please let me know if things work after applying the above commit.

Thank you for the update and improvement.

Indeed, I'm also not able to reproduce the reported behaviour.

Cheers,