Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17221


Ignore:
Timestamp:
08/27/19 16:38:18 (5 years ago)
Author:
jkarder
Message:

#3018: changed HiveJobManagerView.OnClosed() to only clear the HiveClient if no other view is displaying it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveJobManagerView.cs

    r17180 r17221  
    143143    protected override void OnClosed(FormClosedEventArgs e) {
    144144      if (Content != null && Content.Jobs != null) {
    145         Content.ClearHiveClient();
     145        // clear hive client only if it is not displayed by any other content view (i.e. job manager)
     146        var contentViews = MainFormManager.MainForm.Views.OfType<IContentView>();
     147        if (contentViews.All(x => x.Content != Content && x == this))
     148          Content.ClearHiveClient();
     149
    146150        Content = null;
    147151      }
Note: See TracChangeset for help on using the changeset viewer.