diff options
author | Johannes Ranke <johannes.ranke@jrwb.de> | 2015-11-10 14:40:37 +0100 |
---|---|---|
committer | Johannes Ranke <johannes.ranke@jrwb.de> | 2015-11-10 14:40:37 +0100 |
commit | b6f8103d705f8519edbedaf45e8881b7a13054ed (patch) | |
tree | 3ac50ce773a14ecff763305b6177ebb6b588bfe3 /inst/GUI | |
parent | 4eb63dc8e6e13090fef67c6e54522c1cfa9b44c9 (diff) |
Open a windows plotting device if appropriate
Diffstat (limited to 'inst/GUI')
-rw-r--r-- | inst/GUI/gmkin.R | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R index 75b86b3..08c4150 100644 --- a/inst/GUI/gmkin.R +++ b/inst/GUI/gmkin.R @@ -913,6 +913,13 @@ run_fit_handler <- function(h, ...) { #{{{3 err = NULL
}
reweight.method <- svalue(f.gg.opts.reweight.method)
+ if (svalue(f.gg.opts.plot)) {
+ if (.Platform$OS.type == "windows") {
+ # When on windows, check for an active windows device. If not present,
+ # open one
+ if (attr(dev.cur(), "names") != "windows") windows()
+ }
+ }
if (reweight.method == "none") reweight.method = NULL
ftmp <<- mkinfit(m.cur, override(ds.cur$data),
state.ini = iniparms,
@@ -1032,8 +1039,8 @@ f.gg.opts.g <- ggroup(cont = f.config) # First group {{{4
f.gg.opts.1 <- gformlayout(cont = f.gg.opts.g)
solution_types <- c("auto", "analytical", "eigen", "deSolve")
-f.gg.opts.plot <- gcheckbox("Plot during the fit",
- cont = f.gg.opts.1, checked = FALSE)
+f.gg.opts.plot <- gcheckbox("Plot during the fit",
+ cont = f.gg.opts.1, checked = FALSE)
f.gg.opts.st <- gcombobox(solution_types, selected = 1,
label = "solution_type", width = 160,
cont = f.gg.opts.1)
|