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

don't allow setting boundary layer field as background field

parent 623e9cc8
No related branches found
No related tags found
No related merge requests found
...@@ -169,9 +169,6 @@ fieldWindow::fieldWindow(int deltaFontSize) : _deltaFontSize(deltaFontSize) ...@@ -169,9 +169,6 @@ fieldWindow::fieldWindow(int deltaFontSize) : _deltaFontSize(deltaFontSize)
background_btn = new Fl_Round_Button(x, y + h - BH - WB, w - BB - WB, BH, background_btn = new Fl_Round_Button(x, y + h - BH - WB, w - BB - WB, BH,
"Set as background field"); "Set as background field");
background_btn->tooltip(
"Only a single field can be set as background field.\n"
"To combine multiple fields use the Min or Max fields.");
options_tab->end(); options_tab->end();
Fl_Group *help_tab = new Fl_Group(x, y, w, h, "Help"); Fl_Group *help_tab = new Fl_Group(x, y, w, h, "Help");
...@@ -354,8 +351,19 @@ void fieldWindow::loadFieldOptions() ...@@ -354,8 +351,19 @@ void fieldWindow::loadFieldOptions()
(*input)->clear_changed(); (*input)->clear_changed();
input++; input++;
} }
background_btn->value(GModel::current()->getFields()->getBackgroundField() == if(dynamic_cast<BoundaryLayerField*>(f)){
f->id); background_btn->value(0);
background_btn->deactivate();
background_btn->tooltip("Boundary layer fields cannot be assigned in the "
"graphical user interface: edit the file directly.");
}
else{
background_btn->value(GModel::current()->getFields()->getBackgroundField() ==
f->id);
background_btn->activate();
background_btn->tooltip("Only a single field can be set as background field.\n"
"To combine multiple fields use the Min or Max fields.");
}
} }
void fieldWindow::editField(Field *f) void fieldWindow::editField(Field *f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment