Ver Fonte

- Make sure that the selection_visible flag gets reset to false
if
the selection isn't visible. Before this you could get it set
to
visible by changing the selection start, then changing the end
to
equal the start.



svn path=/trunk/mcs/; revision=66518

Jackson Harper há 19 anos atrás
pai
commit
71fbcf0b72

+ 4 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -4,6 +4,10 @@
 	caret.
 	* TextControl.cs: Need to update the caret when we decrement it to
 	zero.
+	- Make sure that the selection_visible flag gets reset to false if
+	the selection isn't visible.  Before this you could get it set to
+	visible by changing the selection start, then changing the end to
+	equal the start.
 
 2006-10-09  Jackson Harper  <[email protected]>
 

+ 4 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs

@@ -3187,6 +3187,8 @@ if (owner.backcolor_set || (owner.Enabled && !owner.read_only)) {
 
 				// This could be calculated better
 				Invalidate(selection_start.line, selection_start.pos, selection_end.line, selection_end.pos);
+			} else {
+				selection_visible = false;
 			}
 
 		}
@@ -3230,6 +3232,8 @@ if (owner.backcolor_set || (owner.Enabled && !owner.read_only)) {
 			if ((selection_end.line != selection_start.line) || (selection_end.pos != selection_start.pos)) {
 				selection_visible = true;
 				Invalidate(selection_start.line, selection_start.pos, selection_end.line, selection_end.pos);
+			} else {
+				selection_visible = false;
 			}
 		}