key icon indicating copy to clipboard operation
key copied to clipboard

Node selection after loading a proof

Open unp1 opened this issue 2 years ago • 4 comments

Description

Loading an open proof selects the root node instead of an open goal. I am not sure if that may be intended behavior, because one can be of course the opinion that this is the better way.

In any case, for teaching I sometimes load proofs that have just one branch open and before that branch would be directly selected, which makes the workflow a bit easier.

In any case, if the change was intended, please close the bug with won't fix.

Reproducible

always

Steps to reproduce

Describe the steps needed to reproduce the issue.

  1. Save an open proof (with on goal open)
  2. Load the proof
  3. Root is selected after loading

My expectation would be that the open goal is selected.

Additional information

Add more details here. In particular: if you have a stacktrace, put it here.


  • Commit: 05635afb51f8125c62fa9338fdc8f3978ce672a5

unp1 avatar Oct 13 '23 10:10 unp1

I agree that selecting an open goal is more useful than selecting the root node. Don't know why it was changed. I think the fix would be a call to mediator.getSelectionModel().defaultSelection() after loading the proof.

FliegendeWurst avatar Oct 13 '23 11:10 FliegendeWurst

There is an advantage to choose the the root goal initially. On large proofs (highly nested, many nodes), rendering the proof tree takes seconds if you select a nested node.

wadoon avatar Oct 19 '23 15:10 wadoon

Wondering. When saving a proof, we could also store that last selected node (if available) and after loading select this node? So that should be done carefully to not introduce GUI dependencies in ProofSaver

unp1 avatar Oct 27 '23 06:10 unp1

I submitted PR #3324 for discussion. It adds the mentioned feature.

unp1 avatar Oct 27 '23 09:10 unp1