Browse Source

WPF Designer: removed incorrect cast that caused columns to be sized incorrectly when inserting into a Grid

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5638 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
147c30cfae
  1. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs

@ -369,8 +369,8 @@ namespace ICSharpCode.WpfDesign.Designer.Controls @@ -369,8 +369,8 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
oldLength = new GridLength(oldActualValue);
}
double percentage = insertionPosition / oldActualValue;
newLength1 = new GridLength((int)(oldLength.Value * percentage), oldLength.GridUnitType);
newLength2 = new GridLength((int)(oldLength.Value - newLength1.Value), oldLength.GridUnitType);
newLength1 = new GridLength(oldLength.Value * percentage, oldLength.GridUnitType);
newLength2 = new GridLength(oldLength.Value - newLength1.Value, oldLength.GridUnitType);
}
#endregion

Loading…
Cancel
Save