Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement issue 802 #815

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/ServiceBusExplorer/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,7 @@ private void RefreshIndividualSubscription(SubscriptionDescription subscriptionD
private void RefreshIndividualTopic(TreeNode selectedNode)
{
var wasTopicNodeExpanded = selectedNode.IsExpanded;
var wasSubscriptionsNodeExpaned = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor spelling error: wasSubscriptionsNodeExpaned -> wasSubscriptionsNodeExpanded

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


var topicDescription = selectedNode.Tag as TopicDescription;

Expand All @@ -1829,6 +1830,13 @@ private void RefreshIndividualTopic(TreeNode selectedNode)
return;
}

//record the original subscriptions node is expanded
var originalSubscriptionsNode = selectedNode.Nodes.Find(SubscriptionEntities, false).First();
if (originalSubscriptionsNode != null)
{
wasSubscriptionsNodeExpaned = originalSubscriptionsNode.IsExpanded;
}

selectedNode.Nodes.Clear();
var subscriptionsNode = selectedNode.Nodes.Add(SubscriptionEntities, SubscriptionEntities, SubscriptionListIconIndex, SubscriptionListIconIndex);
subscriptionsNode.Text = string.IsNullOrWhiteSpace(FilterExpressionHelper.SubscriptionFilterExpression) ? SubscriptionEntities : FilteredSubscriptionEntities;
Expand All @@ -1852,6 +1860,10 @@ private void RefreshIndividualTopic(TreeNode selectedNode)

if (wasTopicNodeExpanded)
selectedNode.Expand();
if (wasSubscriptionsNodeExpaned == true)
{
subscriptionsNode.Expand();
}
}

private void createEntity_Click(object sender, EventArgs e)
Expand Down