Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5380


Ignore:
Timestamp:
01/26/11 13:21:51 (14 years ago)
Author:
mkommend
Message:

ticket #1324 - Corrected ItemSetView to check for duplicates while dropping items.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.cs

    r5237 r5380  
    3636      InitializeComponent();
    3737    }
     38
     39    protected override void itemsListView_DragEnterOver(object sender, DragEventArgs e) {
     40      base.itemsListView_DragEnterOver(sender, e);
     41      if (e.Effect == DragDropEffects.Link || e.Effect == DragDropEffects.Move) {
     42        T item = e.Data.GetData("Value") as T;
     43        if (Content.Contains(item)) e.Effect = DragDropEffects.None;
     44      }
     45    }
    3846  }
    3947}
Note: See TracChangeset for help on using the changeset viewer.