aboutsummaryrefslogtreecommitdiff
path: root/inst
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-09-30 10:55:16 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-09-30 10:55:16 +0200
commitea6d8ddfc73051586bd56f6752dc65a45c7f8c74 (patch)
treedb1dfa78f59083955a87c640df976d4bb53bd376 /inst
parent144fd10b34a885a8038cc38266cd0e188b6a4490 (diff)
Fix updating the fit list when deleting
- Some attempts to improve the comments in the source code - Fix the problem that the fit list was not updated when a fit was deleted. This bug was introduced when I made it possible to sort the fit list in the GUI by changing the type of the first column in the dataframe containing the fits (f.df) on July 16.
Diffstat (limited to 'inst')
-rw-r--r--inst/GUI/gmkin.R10
1 files changed, 5 insertions, 5 deletions
diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R
index 5932f37..af54cc8 100644
--- a/inst/GUI/gmkin.R
+++ b/inst/GUI/gmkin.R
@@ -52,13 +52,13 @@ f.df.empty <- data.frame(Fit = as.integer(0),
Model = "",
stringsAsFactors = FALSE)
# Helper functions {{{1
-# Override function for making it possible to override original data in the GUI {{{2
+# Override function for making it possible to override original data points using the GUI {{{2
override <- function(d) {
data.frame(name = d$name, time = d$time,
value = ifelse(is.na(d$override), d$value, d$override),
err = d$err)
}
-# Update dataframe with datasets for selection {{{2
+# Update dataframe with datasets {{{2
update_ds.df <- function() {
ds.n <- length(ds)
ds.df <<- data.frame(Index = 1:ds.n,
@@ -74,7 +74,7 @@ update_ds.df <- function() {
observed.all <<- union(observed, observed.all)
}
}
-# Update dataframe with models for selection {{{2
+# Update dataframe with models {{{2
update_m.df <- function() {
m.n <- length(m)
m.df <<- data.frame(Index = 1:m.n,
@@ -85,7 +85,7 @@ update_m.df <- function() {
m.df[i, "Name"] <<- m[[m.index]]$name
}
}
-# Update dataframe with fits for selection {{{2
+# Update dataframe with fits {{{2
update_f.df <- function() {
f.df <<- f.df.empty
f.count <- 0
@@ -267,7 +267,7 @@ gbutton("Configure fit for selected model and dataset", cont = dsm,
# Widget and handler for fits {{{1
f.gf <- gframe("Fits", cont = left, horizontal = FALSE)
f.switcher <- function(h, ...) {
- if (svalue(h$obj) != "0") {
+ if (svalue(h$obj) != 0) {
f.cur <<- svalue(h$obj)
ftmp <<- f[[f.cur]]
stmp <<- s[[f.cur]]

Contact - Imprint