[rkward-cvs] SF.net SVN: rkward-code:[4576] trunk/rkward
tfry at users.sf.net
tfry at users.sf.net
Sat Mar 9 12:54:32 UTC 2013
Revision: 4576
http://sourceforge.net/p/rkward/code/4576
Author: tfry
Date: 2013-03-09 12:54:32 +0000 (Sat, 09 Mar 2013)
Log Message:
-----------
Avoid duplicate (broken) addition of lattice plots to plot history.
I wonder why this wasn't needed before, or for how long this has been broken, already.
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2013-03-08 22:35:59 UTC (rev 4575)
+++ trunk/rkward/ChangeLog 2013-03-09 12:54:32 UTC (rev 4576)
@@ -1,3 +1,4 @@
+- Fixed: lattice plots would not be added to the plot history, correctly, for some versions of lattice
- Fix crash when trying to print, and neither okular, nor kpdf are available
- Added support for loaded namespaces that are not attached to a loaded package
- Pluginmaps can specify their "priority". Pluginmaps with low priority will not be added automatically, when found.
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R 2013-03-08 22:35:59 UTC (rev 4575)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R 2013-03-09 12:54:32 UTC (rev 4576)
@@ -144,11 +144,15 @@
{
if (dev.cur() == 1) rk.screen.device ()
## TODO: use "trellis" instead of "lattice" to accomodate ggplot2 plots?
- if (getOption ("rk.enable.graphics.history")) {
+ plot_hist_enabled <- getOption ("rk.enable.graphics.history")
+ if (plot_hist_enabled) {
rk.record.plot$record (nextplot.pkg = "lattice")
+ on.exit (options (rk.enable.graphics.history=TRUE))
+ options (rk.enable.graphics.history=FALSE) # avoid duplicate trigger inside plot(), below
}
plot (x, ...)
- if (getOption ("rk.enable.graphics.history")) {
+ if (plot_hist_enabled) {
+ options (rk.enable.graphics.history=TRUE)
rk.record.plot$.save.tlo.in.hP ()
}
invisible ()
More information about the rkward-tracker
mailing list