Skip to content
Snippets Groups Projects
Commit 41ef9490 authored by Ruth Sabariego's avatar Ruth Sabariego
Browse files

temp fix

parent a532c877
Branches
Tags
No related merge requests found
...@@ -273,13 +273,17 @@ bool onelab::localNetworkClient::run() ...@@ -273,13 +273,17 @@ bool onelab::localNetworkClient::run()
case GmshSocket::GMSH_MERGE_FILE: case GmshSocket::GMSH_MERGE_FILE:
{ {
int n = PView::list.size(); int n = PView::list.size();
for(int i = 0; i < n; i++) for(int i = 0; i < n; i++){
if(PView::list[i]->getData()->getFileName().substr(0, 6) != "OneLab")
PView::list[i]->getOptions()->visible = 0; PView::list[i]->getOptions()->visible = 0;
}
MergeFile(message); MergeFile(message);
if(FlGui::instance()->onelab->hideNewViews()){ if(FlGui::instance()->onelab->hideNewViews()){
for(int i = n; i < PView::list.size(); i++) for(int i = n; i < PView::list.size(); i++){
if(PView::list[i]->getData()->getFileName().substr(0, 6) != "OneLab")
PView::list[i]->getOptions()->visible = 0; PView::list[i]->getOptions()->visible = 0;
} }
}
drawContext::global()->draw(); drawContext::global()->draw();
if(n != (int)PView::list.size()) if(n != (int)PView::list.size())
FlGui::instance()->menu->setContext(menu_post, 0); FlGui::instance()->menu->setContext(menu_post, 0);
...@@ -925,7 +929,8 @@ void onelabWindow::rebuildTree() ...@@ -925,7 +929,8 @@ void onelabWindow::rebuildTree()
but->copy_label(label.c_str()); but->copy_label(label.c_str());
std::vector<Fl_Menu_Item> menu; std::vector<Fl_Menu_Item> menu;
for(unsigned int j = 0; j < strings[i].getChoices().size(); j++){ for(unsigned int j = 0; j < strings[i].getChoices().size(); j++){
Fl_Menu_Item it = {strings[i].getChoices()[j].c_str(), 0, 0, 0, // FIXME memory leak : change the way we construct the menu
Fl_Menu_Item it = {strdup(strings[i].getChoices()[j].c_str()), 0, 0, 0,
(strings[i].getKind() == "file" && (strings[i].getKind() == "file" &&
j == strings[i].getChoices().size() - 1) ? FL_MENU_DIVIDER : 0}; j == strings[i].getChoices().size() - 1) ? FL_MENU_DIVIDER : 0};
menu.push_back(it); menu.push_back(it);
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment