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

reduce redraws

parent 2388ca56
No related branches found
No related tags found
No related merge requests found
...@@ -444,7 +444,7 @@ static std::string getShortName(const std::string &name, const std::string &ok=" ...@@ -444,7 +444,7 @@ static std::string getShortName(const std::string &name, const std::string &ok="
return s; return s;
} }
static void updateOnelabGraph(int num) static bool updateOnelabGraph(int num)
{ {
bool changed = false; bool changed = false;
for(unsigned int i = 0; i < PView::list.size(); i++){ for(unsigned int i = 0; i < PView::list.size(); i++){
...@@ -482,18 +482,19 @@ static void updateOnelabGraph(int num) ...@@ -482,18 +482,19 @@ static void updateOnelabGraph(int num)
changed = true; changed = true;
} }
if(changed){ if(changed)
FlGui::instance()->updateViews(); FlGui::instance()->updateViews();
drawContext::global()->draw(); return changed;
}
} }
static void updateOnelabGraphs() static void updateOnelabGraphs()
{ {
updateOnelabGraph(0); bool redraw0 = updateOnelabGraph(0);
updateOnelabGraph(1); bool redraw1 = updateOnelabGraph(1);
updateOnelabGraph(2); bool redraw2 = updateOnelabGraph(2);
updateOnelabGraph(3); bool redraw3 = updateOnelabGraph(3);
if(redraw0 || redraw1 || redraw2 || redraw3)
drawContext::global()->draw();
} }
static void runGmshClient(const std::string &action) static void runGmshClient(const std::string &action)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment