Author: ivanz
Date: 2008-02-12 12:25:33 -0500 (Tue, 12 Feb 2008)
New Revision: 95533

Modified:
   
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
   
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
Log:
2008-02-12  Ivan N. Zlatev  <[EMAIL PROTECTED]>

        [Backport to 1.9]
        * DateTimeEditor.cs: Set edit value only if the user sets it
        in the editor.
        [Fixes #359159]



Modified: 
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
===================================================================
--- 
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
    2008-02-12 17:25:07 UTC (rev 95532)
+++ 
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/ChangeLog
    2008-02-12 17:25:33 UTC (rev 95533)
@@ -1,3 +1,10 @@
+2008-02-12  Ivan N. Zlatev  <[EMAIL PROTECTED]>
+
+       [Backport to 1.9]
+       * DateTimeEditor.cs: Set edit value only if the user sets it
+       in the editor.
+       [Fixes #359159]
+
 2008-02-05  Ivan N. Zlatev  <[EMAIL PROTECTED]>
 
        * MutilineStringEditor.cs: Make BorderStyle, Width and Height

Modified: 
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
===================================================================
--- 
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
    2008-02-12 17:25:07 UTC (rev 95532)
+++ 
branches/mono-1-9/mcs/class/System.Design/System.ComponentModel.Design/DateTimeEditor.cs
    2008-02-12 17:25:33 UTC (rev 95533)
@@ -55,7 +55,6 @@
 
                public DateTimeEditor ()
                {
-                       control.LostFocus += new EventHandler (changeHandler);
                        control.DateSelected += new DateRangeEventHandler 
(control_DateSelected);
                }
 
@@ -71,10 +70,8 @@
 
                                        editContent = (DateTime)value;
                                        if (editContent > control.MaxDate || 
editContent < control.MinDate)
-                                               editContent = DateTime.Today;
+                                               control.SelectionStart = 
DateTime.Today;
 
-                                       control.SelectionStart = editContent;
-
                                        editorService.DropDownControl (control);
 
                                        return editContent;
@@ -83,11 +80,6 @@
                        return base.EditValue (context, provider, value);
                }
 
-               void changeHandler (object sender, EventArgs e)
-               {
-                       editContent = control.SelectionStart;
-               }
-
                void control_DateSelected (object sender, DateRangeEventArgs e)
                {
                        editContent = e.Start;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to