From 894449530267702cff34bb7cf4db1d6e16198a75 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 8 Jan 2016 18:04:38 +0100 Subject: Do not show fit option widgets when not fit is configured Also give a hint how to configure a fit. --- NEWS.md | 2 ++ inst/GUI/gmkin.R | 17 ++++++++++++++++- vignettes/gmkin_manual.html | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 0b23f4a..0b6954a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -18,6 +18,8 @@ - The project file is now immediately shown with its full path in the project editor window after saving a file. +- Do not show widgets for fit options in 'Configuration' tab when not fit is configured. Also inactivate the run button and show a message telling the user what to do to configure a fit. + ## gmkin 0.6-5 (2015-12-11) ### Bug fixes diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R index 747420e..7e6e273 100644 --- a/inst/GUI/gmkin.R +++ b/inst/GUI/gmkin.R @@ -199,6 +199,9 @@ p.switcher <- function(h, ...) { update_ds.df() update_m.df() update_f.df() + show_fit_option_widgets(FALSE) + f.run$call_Ext("disable") + svalue(f.running.label) <- f.running_noconf p.loaded <<- p.cur project_switched <- TRUE p.modified <<- FALSE @@ -310,6 +313,7 @@ update_f_conf <- function() { # {{{3 svalue(f.gg.opts.reweight.max.iter) <<- ftmp$reweight.max.iter svalue(f.gg.opts.maxit.modFit) <<- ftmp$maxit.modFit svalue(f.gg.opts.method.modFit) <<- ftmp$method.modFit + show_fit_option_widgets(TRUE) update_plot_obssel() f.gg.parms[,] <- get_Parameters(stmp, ftmp$optimised) } @@ -376,6 +380,7 @@ configure_fit_handler <- function(h, ...) { # Configure fit button {{{3 "The model and the dataset you selected do", "not share names for observed variables!") f.run$call_Ext("disable") + show_fit_option_widgets(FALSE) show.initial.gb.u$call_Ext("disable") show.initial.gb.o$call_Ext("disable") f.gg.parms[,] <- Parameters.empty @@ -1132,7 +1137,9 @@ f.run <- gbutton("Run fit", ext.args = list(disabled = TRUE)) f.running.line <- ggroup(cont = f.config) -f.running.label <- glabel("No fit configured", cont = f.running.line) +f.running_noconf <- paste("No fit configured. Please select a dataset and a model and", + "press the button 'Configure fit' on the left.") +f.running.label <- glabel(f.running_noconf, cont = f.running.line) # Fit options forms {{{3 f.gg.opts.g <- ggroup(cont = f.config) @@ -1227,6 +1234,14 @@ f.gg.parms <- gdf(Parameters, cont = f.config, height = 500, do_add_remove_buttons = FALSE) size(f.gg.parms) <- list(columnWidths = c(220, 50, 65, 50, 65)) +# Do not show fit option widgets when no fit is configured +show_fit_option_widgets <- function(show) +{ + visible(f.gg.opts.g) <- show + visible(f.parameters.line) <- show + visible(f.gg.parms) <- show +} +show_fit_option_widgets(FALSE) # center: Results viewer {{{1 r.viewer <- gframe("", horizontal = FALSE, cont = center, diff --git a/vignettes/gmkin_manual.html b/vignettes/gmkin_manual.html index 8b69a86..1a9de0b 100644 --- a/vignettes/gmkin_manual.html +++ b/vignettes/gmkin_manual.html @@ -121,7 +121,7 @@ img {

At startup, the project explorer to the left shows the two project workspaces ‘FOCUS_2006’ and ‘FOCUS_2006_Z’ delivered with the package. The project manangement area in the center gives the possibility to save these projects under a new name, or to start a new, empty project.

A gmkin project workspace contains datasets, kinetic models for fitting, and so-called fits, i.e. the results of fitting models to data. The project area also shows the current working directory, where project workspace files are saved using the file extension .gmkinws.

Once a project has been saved by the user, the project explorer to the left will show it in the project list.

-

Screenshot of saving a new project

+

Screenshot of saving a new project

The current state of a project should repeatedly be saved during the work in order to avoid loosing data. This can be achieved by selecting the ‘Project’ tab in the center and pressing the ‘Save project to project file’ button. More conveniently, the keyboard shortcut Shift-F12 (was Ctrl-X in gmkin < 0.6.6) can be used to save the current status of the project.

In the project file management area, datasets and models can be imported from one of the projects in the project list, once it has been selected in the droplist labelled ‘Import from:’.

Screenshot of importing datasets and models

-- cgit v1.2.1