Skip to content

Commit

Permalink
ISSUE 802
Browse files Browse the repository at this point in the history
  • Loading branch information
NaorisKong committed Dec 2, 2024
1 parent f81be16 commit d537dee
Showing 1 changed file with 12 additions and 0 deletions.
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;

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

0 comments on commit d537dee

Please sign in to comment.