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

fixes

parent 56ae6717
No related branches found
No related tags found
No related merge requests found
...@@ -618,11 +618,11 @@ namespace onelab{ ...@@ -618,11 +618,11 @@ namespace onelab{
typename std::set<T*, parameterLessThan>::iterator it = ps.find((T*)&p); typename std::set<T*, parameterLessThan>::iterator it = ps.find((T*)&p);
if(it != ps.end()){ if(it != ps.end()){
(*it)->update(p); (*it)->update(p);
if(client.size()) (*it)->addClient(client, true); if(client.size()) (*it)->addClient(client, parameter::defaultChangedValue());
} }
else{ else{
T* newp = new T(p); T* newp = new T(p);
if(client.size()) newp->addClient(client, true); if(client.size()) newp->addClient(client, parameter::defaultChangedValue());
ps.insert(newp); ps.insert(newp);
} }
return true; return true;
...@@ -645,7 +645,7 @@ namespace onelab{ ...@@ -645,7 +645,7 @@ namespace onelab{
T tmp(name); T tmp(name);
typename std::set<T*, parameterLessThan>::iterator it = ps.find(&tmp); typename std::set<T*, parameterLessThan>::iterator it = ps.find(&tmp);
if(it != ps.end()){ if(it != ps.end()){
if(client.size()) (*it)->addClient(client, true); if(client.size()) (*it)->addClient(client, parameter::defaultChangedValue());
p.push_back(**it); p.push_back(**it);
} }
} }
...@@ -657,7 +657,7 @@ namespace onelab{ ...@@ -657,7 +657,7 @@ namespace onelab{
T tmp(name); T tmp(name);
typename std::set<T*, parameterLessThan>::iterator it = ps.find(&tmp); typename std::set<T*, parameterLessThan>::iterator it = ps.find(&tmp);
if(it != ps.end()){ if(it != ps.end()){
if(client.size()) (*it)->addClient(client, true); if(client.size()) (*it)->addClient(client, parameter::defaultChangedValue());
return *it; return *it;
} }
return NULL; return NULL;
......
...@@ -177,8 +177,7 @@ void onelab_cb(Fl_Widget *w, void *data) ...@@ -177,8 +177,7 @@ void onelab_cb(Fl_Widget *w, void *data)
if(action == "compute"){ if(action == "compute"){
// after computing with this solver, mark the parameters as unchanged // after computing with this solver, mark the parameters as unchanged
// for this solver // for this solver
onelab::server::instance()->setChanged(false, c->getName()); onelab::server::instance()->setChanged(0, c->getName());
FlGui::instance()->onelab->checkForErrors(c->getName()); FlGui::instance()->onelab->checkForErrors(c->getName());
} }
if(FlGui::instance()->onelab->stop()) break; if(FlGui::instance()->onelab->stop()) break;
......
...@@ -76,7 +76,7 @@ void drawContext::load(std::string filename) ...@@ -76,7 +76,7 @@ void drawContext::load(std::string filename)
onelab_cb("check"); onelab_cb("check");
// mark all parameters as changed to force complete first run // mark all parameters as changed to force complete first run
onelab::server::instance()->setChanged(true); onelab::server::instance()->setChanged(3);
} }
void drawContext::eventHandler(int event, float x, float y) void drawContext::eventHandler(int event, float x, float y)
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
-(void)editValue -(void)editValue
{ {
if(onelab_cb("check") == 1){ if(onelab_cb("check") > 0){
[[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:@"refreshParameters" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshParameters" object:nil];
} }
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
double value = [[alertView textFieldAtIndex:0].text doubleValue]; double value = [[alertView textFieldAtIndex:0].text doubleValue];
number[0].setValue(value); number[0].setValue(value);
onelab::server::instance()->set(number[0]); onelab::server::instance()->set(number[0]);
if(onelab_cb("check") == 1){ if(onelab_cb("check") > 0){
[[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:@"refreshParameters" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshParameters" object:nil];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment