Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/07/13 15:35:12 (11 years ago)
Author:
jhelm
Message:

#1966: Fixed a bug which caused the stacking-contraint to be wrongly enforced; Did some cleanup;

Location:
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs

    r9593 r9598  
    4444      } else {
    4545        Content.Name = "Packing Plan";
    46         for (int i = 0; i < Content.NrOfBins; i++)
    47           binSelection.Items.Add(i);
     46        int i = 0;
     47        foreach (var bp in Content.BinPackings)
     48          binSelection.Items.Add(i++ + " (" + Math.Round(bp.PackingDensity * 100, 2) + "%)");
     49
    4850        binSelection.SelectedIndex = 0;
    4951        UpdateModel();
     
    5355
    5456    private void UpdateModel() {
    55       int currentBin = (binSelection != null && binSelection.SelectedItem != null) ? (int)(binSelection.SelectedItem) : 0;
     57      int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0;
    5658      var bin = Content.BinPackings[currentBin].BinMeasures;
    5759      packingPlan3D.InitializeContainer(bin.Width, bin.Height, bin.Depth);
     
    7173      itemSelection.SelectedIndex = -1;
    7274      itemSelection.Items.Clear();
    73       int currentBin = (binSelection != null && binSelection.SelectedItem != null) ? (int)(binSelection.SelectedItem) : 0;
     75      int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0;
    7476      //for (int i = 0; i < Content.PackingItemPositions.Count; i++) {
    7577      //  if (Content.PackingItemPositions[i].AssignedBin == currentBin)
     
    106108        } else {
    107109          Content.Name = "Packing Plan";
    108           for (int i = 0; i < Content.NrOfBins; i++)
    109             binSelection.Items.Add(i);
     110          int i = 0;
     111          foreach (var bp in Content.BinPackings)
     112            binSelection.Items.Add(i++ + " (" + Math.Round(bp.PackingDensity * 100, 2) + "%)");
    110113          binSelection.SelectedIndex = 0;
    111114          UpdateModel();
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs

    r9596 r9598  
    2626  /// Plugin class for HeuristicLab.Problems.BinPacking.Views plugin.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.Problems.BinPacking.Views", "3.3.7.9593")]
     28  [Plugin("HeuristicLab.Problems.BinPacking.Views", "3.3.7.9596")]
    2929  [PluginFile("HeuristicLab.Problems.BinPacking.Views-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Common", "3.3")]
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Properties/AssemblyInfo.cs

    r9596 r9598  
    5454// by using the '*' as shown below:
    5555[assembly: AssemblyVersion("3.3.0.0")]
    56 [assembly: AssemblyFileVersion("3.3.7.9593")]
     56[assembly: AssemblyFileVersion("3.3.7.9596")]
Note: See TracChangeset for help on using the changeset viewer.