[rkward-cvs] SF.net SVN: rkward: [2022] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Oct 5 10:23:50 UTC 2007


Revision: 2022
          http://rkward.svn.sourceforge.net/rkward/?rev=2022&view=rev
Author:   tfry
Date:     2007-10-05 03:23:50 -0700 (Fri, 05 Oct 2007)

Log Message:
-----------
Corrections regarding object selection

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
    trunk/rkward/rkward/plugin/rkvarslot.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2007-10-03 16:58:32 UTC (rev 2021)
+++ trunk/rkward/ChangeLog	2007-10-05 10:23:50 UTC (rev 2022)
@@ -1,3 +1,5 @@
+- Fixed: Pressing the add button in a varslot with no object selected could crash RKWard
+
 --- Version 0.4.8 - Oct-03-2007
 - New plugins: pie chart, dot chart, crosstabulation, two time-series tests, and basic linear regression
 - barplot plugin allow specification of custom labels

Modified: trunk/rkward/rkward/plugin/rkcomponentproperties.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2007-10-03 16:58:32 UTC (rev 2021)
+++ trunk/rkward/rkward/plugin/rkcomponentproperties.cpp	2007-10-05 10:23:50 UTC (rev 2022)
@@ -713,9 +713,10 @@
 	ObjectList::const_iterator cit = newlist.begin ();
 	while (cit != newlist.end ()) {
 		if (!object_list.contains (*cit)) {
-			if (isObjectValid (*cit));
-			object_list.append (*cit);
-			changes = true;
+			if (isObjectValid (*cit)) {
+				object_list.append (*cit);
+				changes = true;
+			}
 		}
 		++cit;
 	}
@@ -769,6 +770,7 @@
 RObject *RKComponentPropertyRObjects::objectValue () {
 	RK_TRACE (PLUGIN);
 
+	if (object_list.empty ()) return 0;
 	return (object_list.first ());
 }
 

Modified: trunk/rkward/rkward/plugin/rkvarslot.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkvarslot.cpp	2007-10-03 16:58:32 UTC (rev 2021)
+++ trunk/rkward/rkward/plugin/rkvarslot.cpp	2007-10-05 10:23:50 UTC (rev 2022)
@@ -175,8 +175,8 @@
 	if (add_mode) {
 		if (multi) {
 			ObjectList objlist = source->objectList ();
-			ObjectList::const_iterator it = objlist.begin ();
-			while (it != objlist.end ()) {
+			ObjectList::const_iterator it = objlist.constBegin ();
+			while (it != objlist.constEnd ()) {
 				available->addObjectValue (*it);
 				++it;
 			}


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