Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8914


Ignore:
Timestamp:
11/15/12 14:08:11 (12 years ago)
Author:
ascheibe
Message:

#1950

  • fixed nasty permission exception: refresh automatically can only be activated after the job is actually uploaded to the server
  • fixed setting refresh automatically correctly when switching between jobs
Location:
trunk/sources
Files:
3 edited

Legend:

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

    r8884 r8914  
    4545    private ProgressView progressView;
    4646    private HiveResourceSelectorDialog hiveResourceSelectorDialog;
     47    private bool SuppressEvents { get; set; }
    4748
    4849    public new RefreshableJob Content {
     
    122123    protected override void OnContentChanged() {
    123124      base.OnContentChanged();
    124       if (Content == null) {
    125         nameTextBox.Text = string.Empty;
    126         executionTimeTextBox.Text = string.Empty;
    127         resourceNamesTextBox.Text = string.Empty;
    128         isPrivilegedCheckBox.Checked = false;
    129         logView.Content = null;
    130         refreshAutomaticallyCheckBox.Checked = false;
    131         runCollectionViewHost.Content = null;
    132       } else {
    133         nameTextBox.Text = Content.Job.Name;
    134         executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    135         resourceNamesTextBox.Text = Content.Job.ResourceNames;
    136         isPrivilegedCheckBox.Checked = Content.Job.IsPrivileged;
    137         refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically;
    138         logView.Content = Content.Log;
    139         runCollectionViewHost.Content = GetAllRunsFromJob(Content);
     125      SuppressEvents = true;
     126      try {
     127        if (Content == null) {
     128          nameTextBox.Text = string.Empty;
     129          executionTimeTextBox.Text = string.Empty;
     130          resourceNamesTextBox.Text = string.Empty;
     131          isPrivilegedCheckBox.Checked = false;
     132          logView.Content = null;
     133          refreshAutomaticallyCheckBox.Checked = false;
     134          runCollectionViewHost.Content = null;
     135        } else {
     136          nameTextBox.Text = Content.Job.Name;
     137          executionTimeTextBox.Text = Content.ExecutionTime.ToString();
     138          resourceNamesTextBox.Text = Content.Job.ResourceNames;
     139          isPrivilegedCheckBox.Checked = Content.Job.IsPrivileged;
     140          refreshAutomaticallyCheckBox.Checked = Content.RefreshAutomatically;
     141          logView.Content = Content.Log;
     142          runCollectionViewHost.Content = GetAllRunsFromJob(Content);
     143        }
     144      }
     145      finally {
     146        SuppressEvents = false;
    140147      }
    141148      hiveExperimentPermissionListView.Content = null; // has to be filled by refresh button
     
    428435
    429436    private void refreshAutomaticallyCheckBox_CheckedChanged(object sender, EventArgs e) {
    430       if (Content != null) Content.RefreshAutomatically = refreshAutomaticallyCheckBox.Checked;
     437      if (Content != null && !SuppressEvents) Content.RefreshAutomatically = refreshAutomaticallyCheckBox.Checked;
    431438    }
    432439
    433440    private void isPrivilegedCheckBox_Validated(object sender, EventArgs e) {
    434       if (Content != null) Content.Job.IsPrivileged = isPrivilegedCheckBox.Checked;
     441      if (Content != null && !SuppressEvents) Content.Job.IsPrivileged = isPrivilegedCheckBox.Checked;
    435442    }
    436443
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r8700 r8914  
    294294        cancellationToken.ThrowIfCancellationRequested();
    295295
    296         if (refreshableJob.RefreshAutomatically) refreshableJob.StartResultPolling();
     296        refreshableJob.RefreshAutomatically = true;
     297        refreshableJob.StartResultPolling();
    297298
    298299        // upload tasks
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs

    r8871 r8914  
    189189    #region Constructors and Cloning
    190190    public RefreshableJob() {
    191       this.refreshAutomatically = true;
     191      this.refreshAutomatically = false;
    192192      this.Job = new Job();
    193193      this.log = new ThreadSafeLog();
Note: See TracChangeset for help on using the changeset viewer.