diff mde/content/AStringContent.d @ 165:bb2f1a76346d

Fixed a few bugs; most notably changing the translation reloads the text on PopupMenuWidgets now.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 07 Jun 2009 16:20:16 +0200
parents c13bded1bed3
children 620d4ea30228
line wrap: on
line diff
--- a/mde/content/AStringContent.d	Sat May 23 17:23:21 2009 +0200
+++ b/mde/content/AStringContent.d	Sun Jun 07 16:20:16 2009 +0200
@@ -76,7 +76,6 @@
     
     /** Set the content via conversion to/from string. */
     override bool set (IContent c) {
-	//AStringContent asc = cast (AStringContent) c;
 	if (c !is null) {
 	    sv = c.toString (0).dup;
 	    return endEdit;
@@ -590,9 +589,10 @@
 	bc.set = sc;
 	assert (!bc());
 	
+	sc = "2.5";
+	ic.set = sc;	// parses as float and rounds
+	assert (ic() == 2);	// rounds to even
 	sc = "31.5";
-	ic.set = sc;	// parses as int which fails
-	assert (ic() == 16);
 	dc.set = sc;
 	ic.set = dc;	// rounds to even
 	assert (ic() == 32);