Skip to content
Snippets Groups Projects
Commit 264cf6b6 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

don't hide ModelName + better treatment of ReadOnly

parent 4c7fcc87
Branches
Tags
No related merge requests found
......@@ -314,4 +314,5 @@ class inputRange : public Fl_Group {
std::string graph(){ return _graph_val; }
void color(int col){ _input->color(col); }
int color(){ return _input->color(); }
Fl_Value_Input *input(){ return _input; }
};
......@@ -436,7 +436,6 @@ static void guessModelName(onelab::client *c)
std::string name(split[0] + split[1] + ext);
onelab::string o(c->getName() + "/1ModelName", name, "Model name");
o.setKind("file");
o.setVisible(false);
c->set(o);
}
}
......@@ -1095,10 +1094,10 @@ void onelabWindow::_addParameter(onelab::number &p)
Fl_Color c;
if(getFlColor(p.getAttribute("Highlight"), c))
but->color(c);
if(p.getReadOnly()){
getFlColor("AliceBlue", c); // rendre également la case non éditable
but->color(c);
}
if(p.getReadOnly())
but->deactivate();
else
but->activate();
but->align(FL_ALIGN_RIGHT);
but->callback(onelab_input_range_cb, (void*)n);
but->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY);
......@@ -1143,10 +1142,10 @@ void onelabWindow::_addParameter(onelab::string &p)
Fl_Color c;
if(getFlColor(p.getAttribute("Highlight"), c))
but->input()->color(c);
if(p.getReadOnly()){
getFlColor("ALiceBlue", c); // rendre également la case non éditable
but->input()->color(c);
}
if(p.getReadOnly())
but->input()->deactivate();
else
but->input()->activate();
but->align(FL_ALIGN_RIGHT);
but->callback(onelab_input_choice_cb, (void*)n);
but->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment