Fix building with -DGVARS=NO (#1232)

* Fix building with -DGVARS=NO

* Thx @eshifri for the tip

Better solution

* Don't show GVARS tab if GVARS turned off

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Risto
2021-12-10 09:50:45 +11:00
committed by GitHub
co-authored by Peter Feerick
parent 54e7caf07e
commit 1912ec6426
2 changed files with 13 additions and 4 deletions
+2
View File
@@ -46,7 +46,9 @@ ModelMenu::ModelMenu():
addTab(new ModelMixesPage());
addTab(new ModelOutputsPage());
addTab(new ModelCurvesPage());
#if defined(GVARS)
addTab(new ModelGVarsPage());
#endif
addTab(new ModelLogicalSwitchesPage());
addTab(new SpecialFunctionsPage(g_model.customFn));
#if defined(LUA_MODEL_SCRIPTS)
+11 -4
View File
@@ -78,16 +78,23 @@ class OutputEditWindow : public Page {
new StaticText(window, grid.getLabelSlot(), TR_MIN, 0,
COLOR_THEME_PRIMARY1);
new GVarNumberEdit(window, grid.getFieldSlot(), -limit, 0,
GET_SET_DEFAULT(output->min), 0, PREC1,
-LIMIT_STD_MAX);
GET_SET_DEFAULT(output->min), 0, PREC1
#if defined(GVARS)
, -LIMIT_STD_MAX
#endif
);
grid.nextLine();
// Max
new StaticText(window, grid.getLabelSlot(), TR_MAX, 0,
COLOR_THEME_PRIMARY1);
new GVarNumberEdit(window, grid.getFieldSlot(), 0, +limit,
GET_SET_DEFAULT(output->max), 0, PREC1,
+LIMIT_STD_MAX);
GET_SET_DEFAULT(output->max), 0, PREC1
#if defined(GVARS)
, +LIMIT_STD_MAX
#endif
);
grid.nextLine();
// Direction