Virtual-TreeView icon indicating copy to clipboard operation
Virtual-TreeView copied to clipboard

Merge DoCancelEdit() and DoEndEdit() in one procedure with boolean parameter

Open joachimmarder opened this issue 6 years ago • 4 comments

They contain almost identical code. Use a boolean parameter instead. Also merge IVTEditLink.CancelEditand EndEdit, they also contain almost identical code.

joachimmarder avatar Apr 08 '19 19:04 joachimmarder

How would such a procedure and parameter be named? If a good name is found I'd say merge them.

MHumm avatar Jan 20 '21 12:01 MHumm

I'd suggest to stick with DoEndEditor use DoTerminateEdit.

joachimmarder avatar Jan 20 '21 13:01 joachimmarder

What about "IsCancelled"? If true it's a cancel operation, else it's a normal ending.

MHumm avatar Jul 31 '22 13:07 MHumm

If editing was canceled then this should be signaled through a parameter of the merged method.

joachimmarder avatar Jul 31 '22 16:07 joachimmarder