Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/14/08 16:52:55 (16 years ago)
Author:
gkronber
Message:

fixed a bug in multiple selection #270

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChart.cs

    r567 r569  
    230230        double maxX = Math.Max(a.X, b.X);
    231231        double maxY = Math.Max(a.Y, b.Y);
    232         HeuristicLab.Charting.Rectangle r = new HeuristicLab.Charting.Rectangle(this, minX, minY, maxX, maxY);
     232        HeuristicLab.Charting.Rectangle rect = new HeuristicLab.Charting.Rectangle(this, minX, minY, maxX, maxY);
    233233
    234234        List<IPrimitive> primitives = new List<IPrimitive>();
     
    236236
    237237        foreach(FixedSizeCircle p in primitives) {
    238           if(r.ContainsPoint(p.Point)) {
    239             primitiveToRecordDictionary[p].ToggleSelected();
     238          if(rect.ContainsPoint(p.Point)) {
     239            Record r;
     240            primitiveToRecordDictionary.TryGetValue(p, out r);
     241            if(r != null) r.ToggleSelected();
    240242          }
    241243        }
     244        results.FireChanged();
    242245      } else {
    243246        base.MouseDrag(start, end, button);
    244247      }
    245248    }
     249
     250    public override void MouseClick(Point point, MouseButtons button) {
     251      if(button == MouseButtons.Left) {
     252        Record r = GetRecord(point);
     253        if(r != null) r.ToggleSelected();
     254        results.FireChanged();
     255      } else {
     256        base.MouseClick(point, button);
     257      }
     258    }
     259
     260    public override void MouseDoubleClick(Point point, MouseButtons button) {
     261      if(button == MouseButtons.Left) {
     262        Record r = GetRecord(point);
     263        if(r != null) r.OpenModel();
     264      } else {
     265        base.MouseDoubleClick(point, button);
     266      }
     267    }
    246268  }
    247269}
Note: See TracChangeset for help on using the changeset viewer.