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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Oct 11 11:36:01 UTC 2006


Revision: 843
          http://svn.sourceforge.net/rkward/?rev=843&view=rev
Author:   tfry
Date:     2006-10-11 04:35:56 -0700 (Wed, 11 Oct 2006)

Log Message:
-----------
Make sure to watch newly created symbols. Fix column deletion logic

Modified Paths:
--------------
    trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp
    trunk/rkward/rkward/dataeditor/twintable.cpp

Modified: trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp
===================================================================
--- trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp	2006-10-11 10:37:23 UTC (rev 842)
+++ trunk/rkward/rkward/dataeditor/rkeditordataframe.cpp	2006-10-11 11:35:56 UTC (rev 843)
@@ -171,7 +171,7 @@
 	}
 	command.append (")");
 
-	RKGlobals::rInterface ()->issueCommand (new RCommand (command, RCommand::Sync), sync_chain);
+	RKGlobals::rInterface ()->issueCommand (new RCommand (command, RCommand::Sync | RCommand::ObjectListUpdate), sync_chain);
 	for (int col=0; col < table->numTrueCols (); col++) {
 		getColObject (col)->restore (sync_chain);
 	}
@@ -234,13 +234,13 @@
 	// for now:
 	if (col < 0) return;
 
-	deleteColumn (col);
 	object->setObjectOpened (this, false);
 	
 	for (int i=(col+1); i < numTrueCols (); ++i) {
 		setColObject (i-1, getColObject (i));
 	}
-	setColObject (numTrueCols (), 0);
+	setColObject (numTrueCols () - 1, 0);
+	deleteColumn (col);
 }
 
 void RKEditorDataFrame::restoreObject (RObject *object) {

Modified: trunk/rkward/rkward/dataeditor/twintable.cpp
===================================================================
--- trunk/rkward/rkward/dataeditor/twintable.cpp	2006-10-11 10:37:23 UTC (rev 842)
+++ trunk/rkward/rkward/dataeditor/twintable.cpp	2006-10-11 11:35:56 UTC (rev 843)
@@ -147,6 +147,8 @@
 	if ((column >= 0) && (column < numTrueCols ())) {
 		varview->removeColumn (column);
 		dataview->removeColumn (column);
+		varview->updateContents ();
+		dataview->updateContents ();
 	}
 }
 
@@ -473,9 +475,9 @@
 void TwinTable::setColObject (long int column, RKVariable *object) {
 	RK_TRACE (EDITOR);
 	if (object) {
-		col_map.insert (column, object);
+		col_map.replace (column, object);		// will insert, if not already in dict
 	} else {
-		col_map.take (column);
+		col_map.remove (column);
 	}
 }
 


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