#1) Wipe the diffcontext dirlist when doing a file compare.
#2) Check for empty diffcontext & bail out of
UpdateItemStatus in that case.
Altered and original files (MainFrm.cpp, DiffContext.*)
Logged In: YES
Kimmo is right. Dirdoc gets updated because it is not empty,
and that is a bug.
An empty Dirdoc has no m_pCtxt (and no m_pFilter), not
even an empty m_pCtxt.
My suggestion is to delete both m_pCtxt and m_pFilter (in
Logged In: YES
My thought is that the bug is not about empty dirdocs (I
think that CMergeDoc::OnFileSave already handles them
correctly), but about nonempty dirdocs.
I don't like clearing things in ReusingDirDoc because if the
user cancels a dirty save, I think everything should stay
Actually I'm not thrilled with ReusingDirDoc calling
"m_pDirView->DeleteAllDisplayItems" (which it does now),
because now we have the phenomenon that if you push the open
button, then cancel the open dialog, all your previous diff
is gone. I'm not entirely thrilled with that. But, the other
way would be to wait and clear after you push Ok on the open
dialog, which would leave all the diff listing in the dirdoc
visible behind the file open dialog you're filling out (and
I'm not sure I like that either). I'm not sure what I think.
What do you think ?
I'm going to mark this patch rejected. Right now we're
clearing all display items in ReusingDirDoc, so we may as
well delete the diff context there as well. To change that
procedure would be a different issue than solving the