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

small cleanup

parent a3837a5f
No related branches found
No related tags found
No related merge requests found
......@@ -263,7 +263,7 @@ FlGui::FlGui(int argc, char **argv)
geoContext = new geometryContextWindow(CTX::instance()->deltaFontSize);
meshContext = new meshContextWindow(CTX::instance()->deltaFontSize);
about = new aboutWindow();
for(int i = 0; i < 5; i++)
for(int i = 0; i < NB_SOLVER_MAX; i++)
solver.push_back(new solverWindow(i, CTX::instance()->deltaFontSize));
// init solver plugin stuff
......
......@@ -13,6 +13,7 @@
#define GMSH_WINDOW_BOX FL_FLAT_BOX
#define NB_BUTT_SCROLL 25
#define NB_HISTORY_MAX 1000
#define NB_SOLVER_MAX 5
#define IW (10 * FL_NORMAL_SIZE) // input field width
#define BB (7 * FL_NORMAL_SIZE) // width of a button with internal label
#define BH (2 * FL_NORMAL_SIZE + 1) // button height
......
......@@ -152,39 +152,18 @@ void GmshRemote::run(std::string args)
Msg::StatusBar(2, false, "%s %s", name.c_str(), message);
break;
case GmshSocket::GMSH_OPTION_1:
if(initOption[0]){
optionValue[0].clear();
initOption[0] = false;
}
optionValue[0].push_back(message);
break;
case GmshSocket::GMSH_OPTION_2:
if(initOption[1]){
optionValue[1].clear();
initOption[1] = false;
}
optionValue[1].push_back(message);
break;
case GmshSocket::GMSH_OPTION_3:
if(initOption[2]){
optionValue[2].clear();
initOption[2] = false;
}
optionValue[2].push_back(message);
break;
case GmshSocket::GMSH_OPTION_4:
if(initOption[3]){
optionValue[3].clear();
initOption[3] = false;
}
optionValue[3].push_back(message);
break;
case GmshSocket::GMSH_OPTION_5:
if(initOption[4]){
optionValue[4].clear();
initOption[4] = false;
{
int i = (int)type - (int)GmshSocket::GMSH_OPTION_1;
if(initOption[i]){
optionValue[i].clear();
initOption[i] = false;
}
optionValue[i].push_back(message);
}
optionValue[4].push_back(message);
break;
case GmshSocket::GMSH_MERGE_FILE:
if(mergeViews) {
......@@ -240,7 +219,7 @@ void GmshRemote::run(std::string args)
if(this == it->second) break;
num++;
}
if(num >= 0 && num < 5){
if(num >= 0 && num < NB_SOLVER_MAX){
for(unsigned int i = 0; i < optionName.size(); i++) {
if(optionName[i].empty()) break;
FlGui::instance()->solver[num]->choice[i]->clear();
......@@ -478,7 +457,7 @@ solverWindow::solverWindow(int solverIndex, int deltaFontSize)
choice[i]->align(FL_ALIGN_RIGHT);
}
static int arg[5][5][2];
static int arg[NB_SOLVER_MAX][5][2];
for(unsigned int i = 0; i < GmshRemote::get(solverIndex)->buttonName.size(); i++) {
if(GmshRemote::get(solverIndex)->buttonName[i].size()){
arg[solverIndex][i][0] = solverIndex;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment