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

fix for newer version of FLTK, which do not allow make_current() in draw()

(we now just redraw the whole widget everytime, instead of doing progressive drawing)
parent 9c38c59b
Branches
Tags
No related merge requests found
...@@ -78,8 +78,6 @@ void colorbarWindow::redraw_range(int a, int b) ...@@ -78,8 +78,6 @@ void colorbarWindow::redraw_range(int a, int b)
int intensity = 0; int intensity = 0;
double H, S, V; double H, S, V;
make_current();
if(a < 0) if(a < 0)
a = 0; a = 0;
if(b >= ct->size) if(b >= ct->size)
...@@ -250,8 +248,6 @@ void colorbarWindow::redraw_marker() ...@@ -250,8 +248,6 @@ void colorbarWindow::redraw_marker()
char str[50]; char str[50];
double val; double val;
make_current();
y0 = marker_y; y0 = marker_y;
y1 = h() - 1; y1 = h() - 1;
...@@ -571,7 +567,6 @@ int colorbarWindow::handle(int event) ...@@ -571,7 +567,6 @@ int colorbarWindow::handle(int event)
if(move_marker) { if(move_marker) {
// changing marker position // changing marker position
marker_pos = entry; marker_pos = entry;
redraw_marker();
} }
else { else {
// changing color graph // changing color graph
...@@ -613,14 +608,10 @@ int colorbarWindow::handle(int event) ...@@ -613,14 +608,10 @@ int colorbarWindow::handle(int event)
} }
ct->table[i] = CTX::instance()->packColor(red, green, blue, alpha); ct->table[i] = CTX::instance()->packColor(red, green, blue, alpha);
} }
// redraw the color curves
if(pentry < entry)
redraw_range(pentry - 1, entry + 1);
else
redraw_range(entry - 1, pentry + 1);
pentry = entry; pentry = entry;
*viewchanged = true; *viewchanged = true;
} }
redraw();
return 1; return 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment