Fix an issue where a file is deselected when returning to the folder compare window after opening the file compare window by double-clicking the file in the folder compare window. #857
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes a file is deselected when returning to the folder compare window after opening the file compare window by double-clicking the file in the folder compare window.
For example, it occurs by the following procedure.
Step 0. Set as follows.
Step 1. Compare directories with the same three files.
Step 2. Adjust the window size to just fit the three files.
Step 3. Double-click on the third file. This open a file compare window with the message "The selected files are identical."
Step 4. Close the message box and select the folder compare window. At this time, the third file is deselected.
It is a bit inconvenient because we lose track of which file had been checked when checking the differences between the files in the folder one by one, if the file is deselected when we return to the folder compare window.
Regarding this behavior, I suspect it is not good that CListView::OnLButtonDblClk() is executed while the focus is out of the folder compare window by opening the file compare window.
With this PR, CDirView::OnLButtonDblClk() now executes CListView::OnLButtonDblClk() only when it is in focus.