Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/12/10 15:37:36 (14 years ago)
Author:
gkronber
Message:

Removed unnecessary combobox in function library editor. Functions can be dragged in from the right into the allowed sub-functions lists. #873 (FunctionLibraryEditor GUI should be simplified)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP/3.3/FunctionLibraryEditor.cs

    r2729 r2788  
    5757      initListView.Items.Clear();
    5858      functionsListView.Clear();
    59       functionsComboBox.Items.Clear();
    6059      foreach (IFunction fun in FunctionLibrary.Functions) {
    6160        functionsListView.Items.Add(CreateListViewItem(fun));
    62         functionsComboBox.Items.Add(fun);
    6361        if (fun.Manipulator != null) {
    6462          mutationListView.Items.Add(CreateListViewItem(fun));
     
    134132      data.SetData("DragSource", functionsListView);
    135133      DoDragDrop(data, DragDropEffects.Link);
    136     }
    137 
    138     private void functionsComboBox_SelectedIndexChanged(object sender, EventArgs e) {
    139       if (functionsComboBox.SelectedItem != null) {
    140         IFunction selectedFun = (IFunction)functionsComboBox.SelectedItem;
    141         Control funView = (Control)selectedFun.CreateView();
    142         funView.Dock = DockStyle.Fill;
    143         functionDetailsPanel.Controls.Clear();
    144         functionDetailsPanel.Controls.Add(funView);
    145       }
    146134    }
    147135
     
    320308    }
    321309    #endregion
     310
     311    private void functionsListView_MouseUp(object sender, MouseEventArgs e) {
     312      if (functionsListView.SelectedItems.Count > 0) {
     313        IFunction selectedFun = (IFunction)functionsListView.SelectedItems[0].Tag;
     314        Control funView = (Control)selectedFun.CreateView();
     315        funView.Dock = DockStyle.Fill;
     316        functionDetailsPanel.Controls.Clear();
     317        functionDetailsPanel.Controls.Add(funView);
     318      }
     319    }
    322320  }
    323321}
Note: See TracChangeset for help on using the changeset viewer.