[rkward-cvs] SF.net SVN: rkward:[2944] trunk/rkward/rkward
kapatp at users.sourceforge.net
kapatp at users.sourceforge.net
Tue Jul 6 05:29:32 UTC 2010
Revision: 2944
http://rkward.svn.sourceforge.net/rkward/?rev=2944&view=rev
Author: kapatp
Date: 2010-07-06 05:29:32 +0000 (Tue, 06 Jul 2010)
Log Message:
-----------
Ask and remove extra plot when reducing the maximum history length. See http://thread.gmane.org/gmane.comp.statistics.rkward.devel/835/focus=858
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R 2010-07-06 01:22:05 UTC (rev 2943)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R 2010-07-06 05:29:32 UTC (rev 2944)
@@ -326,6 +326,24 @@
}
invisible (NULL)
}
+ .verify.hist.limits <- function ()
+ {
+ # Length restriction:
+ len.max <- getOption ('rk.graphics.hist.max.length')
+ len.r <- length (recorded)
+
+ ans <- 'no'
+ if (len.max < len.r) {
+ ## TODO: implement using rk.ask.yesnocancel ()
+ ans <- readline (paste ('Current screen history has more plots than the maximum number chosen. ',len.r - len.max,' of the foremost plots will be removed.\nIf you want to continue type [y]es. Instead, if you prefer to remove them yourself type [n]o or hit Cancel.', sep = ''))
+ if (tolower(ans) %in% c('y', 'yes'))
+ remove (deviceId = NULL, pos = 1:(len.r - len.max))
+ }
+
+ # Size restriction:
+ #s <- getOption ('rk.graphics.hist.max.plotsize')
+ # Existing plots are not checked for their sizes, only the new ones are.
+ }
env
}
Modified: trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp 2010-07-06 01:22:05 UTC (rev 2943)
+++ trunk/rkward/rkward/settings/rksettingsmoduleoutput.cpp 2010-07-06 05:29:32 UTC (rev 2944)
@@ -196,7 +196,7 @@
if (graphics_type == "\"JPG\"") command.append (", \"rk.graphics.jpg.quality\"=" + QString::number (graphics_jpg_quality));
command.append (", \"rk.graphics.hist.max.length\"=" + QString::number (graphics_hist_max_length));
command.append (", \"rk.graphics.hist.max.plotsize\"=" + QString::number (graphics_hist_max_plotsize));
- list.append (command + ")\n");
+ list.append (command + ")\nrk.record.plot$.verify.hist.limits ()\n");
return (list);
}
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