versionone / VersionOne.Client.VisualStudio

View and update VersionOne work items directly from Visual Studio
http://versionone.github.io/VersionOne.Client.VisualStudio
BSD 3-Clause "New" or "Revised" License
2 stars 10 forks source link

Retain expanded nodes #59

Closed JogoShugh closed 10 years ago

JogoShugh commented 11 years ago

As a developer, I want to be able to add new secondary workitems quickly so that I can write tasks and tests in my IDE as they occur to me.

The client is forcing a full list refresh, including flashing the window white and collapsing any selected nodes when the user clicks the add Defect, Task, or Test buttons. This is very painful behavior, and makes the experience very poor.

How to Reproduce

MatiasHeffel commented 11 years ago

We've found that when something change in the model of the treeview everything in the tree is refreshed and collapsed. Looking the documentation of this library we found the following issue with this patch: http://sourceforge.net/p/treeviewadv/patches/10/

On the other hand, looking in the Sample code in this library, there is an example where a node is added using the parent of the node as argument

 OnStructureChanged(new TreePathEventArgs(parent));

The plugin is using another implementation, so we can try two approaches:

We are current work in both alternatives and then discuss which is the best solution.

davidhaimovich commented 11 years ago

Solution number 1 worked well.

Replacing: model.InvokeStructureChanged();

to model.InvokeStructureChanged(treePath);

Makes the tree refresh only the section inside treePath node and not all the tree. This will allow us to avoid collapsing all the tree, after adding an asset.

MatiasHeffel commented 11 years ago

Revert Item when it was just created a new node it not collapsing the treeview anymore, using the same approach that we used before.

MatiasHeffel commented 11 years ago

To DO