There is a problem with lost selection on an edge. Create a sketch, create two lines, Esc, Select the first line, with SHIFT select the second line - selection of the first line is lost.
It seems that the reason is the Deactivate of AIS_IO lost the selection state in OCC for the object and by any redisplay it is deselected.
It is decided to minimize number of deactivate call and use the same active mode during edit operation(the line selection) like in the sketch operation. In the case, the scenario do not call deactivate and selection is saved.