[rkward-cvs] SF.net SVN: rkward: [2161] branches/KDE4_port/rkward/misc/rkspinbox.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Nov 2 12:11:20 UTC 2007


Revision: 2161
          http://rkward.svn.sourceforge.net/rkward/?rev=2161&view=rev
Author:   tfry
Date:     2007-11-02 05:11:20 -0700 (Fri, 02 Nov 2007)

Log Message:
-----------
Better default precision for int-mode spinboxes

Modified Paths:
--------------
    branches/KDE4_port/rkward/misc/rkspinbox.cpp

Modified: branches/KDE4_port/rkward/misc/rkspinbox.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkspinbox.cpp	2007-11-02 12:04:06 UTC (rev 2160)
+++ branches/KDE4_port/rkward/misc/rkspinbox.cpp	2007-11-02 12:11:20 UTC (rev 2161)
@@ -128,7 +128,7 @@
 	} else {
 		int power;
 		if (int_value != 0) {
-			power = (int) log10 (abs (int_value));
+			power = (int) log10 (abs (int_value)) - default_precision;
 		} else {
 			power = -default_precision;
 		}
@@ -186,7 +186,7 @@
 	int_max = max;
 	RK_ASSERT (int_min < int_max);
 	int_value = initial;
-	default_precision = 0;
+	default_precision = 1;
 
 	mode = Integer;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list