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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user