Only draw in expose callback in RS01/RS02/RS03 windows

This commit is contained in:
Paul Dicker
2025-04-03 21:26:36 +02:00
committed by Stéphane Lesimple
parent fb7198c1e9
commit 923fe44e4a
6 changed files with 12 additions and 15 deletions

View File

@@ -56,7 +56,8 @@ void ResetRS01VerifyWindow(Method *self)
wl->lastPercent = 0;
GuiFillSpiral(wl->cmpSpiral, Closure->background);
GuiDrawSpiral(wl->cmpSpiral);
if (wl->cmpSpiral->widget)
gtk_widget_queue_draw(wl->cmpSpiral->widget);
}
/***

View File

@@ -174,7 +174,7 @@ void CreateRS01EWindow(Method *method, GtkWidget *parent)
static gboolean set_max_idle_func(gpointer data)
{ RS01Widgets *wl = (RS01Widgets*)data;
redraw_curve(wl);
gtk_widget_queue_draw(wl->fixCurve->widget);
return FALSE;
}
@@ -304,9 +304,7 @@ void ResetRS01FixWindow(Method *method)
RS01UpdateFixResults(wl, 0, 0);
if(wl->fixCurve && wl->fixCurve->widget)
{ gdk_window_clear(gtk_widget_get_window(wl->fixCurve->widget));
redraw_curve(wl);
}
gtk_widget_queue_draw(wl->fixCurve->widget);
wl->percent = 0;
wl->lastPercent = 0;

View File

@@ -59,7 +59,8 @@ void ResetRS02VerifyWindow(Method *self)
wl->lastPercent = 0;
GuiFillSpiral(wl->cmpSpiral, Closure->background);
GuiDrawSpiral(wl->cmpSpiral);
if (wl->cmpSpiral->widget)
gtk_widget_queue_draw(wl->cmpSpiral->widget);
}
/***

View File

@@ -111,7 +111,7 @@ void CreateRS02EncWindow(Method *method, GtkWidget *parent)
static gboolean set_max_idle_func(gpointer data)
{ RS02Widgets *wl = (RS02Widgets*)data;
redraw_curve(wl);
gtk_widget_queue_draw(wl->fixCurve->widget);
return FALSE;
}
@@ -239,9 +239,7 @@ void ResetRS02FixWindow(Method *method)
RS02UpdateFixResults(wl, 0, 0);
if(wl->fixCurve && wl->fixCurve->widget)
{ gdk_window_clear(gtk_widget_get_window(wl->fixCurve->widget));
redraw_curve(wl);
}
gtk_widget_queue_draw(wl->fixCurve->widget);
wl->percent = 0;
wl->lastPercent = 0;

View File

@@ -69,7 +69,8 @@ void ResetRS03VerifyWindow(Method *self)
wl->lastPercent = 0;
GuiFillSpiral(wl->cmpSpiral, Closure->background);
GuiDrawSpiral(wl->cmpSpiral);
if (wl->cmpSpiral->widget)
gtk_widget_queue_draw(wl->cmpSpiral->widget);
}
/***

View File

@@ -144,7 +144,7 @@ void CreateRS03EncWindow(Method *method, GtkWidget *parent)
static gboolean set_max_idle_func(gpointer data)
{ RS03Widgets *wl = (RS03Widgets*)data;
redraw_curve(wl);
gtk_widget_queue_draw(wl->fixCurve->widget);
return FALSE;
}
@@ -269,9 +269,7 @@ void ResetRS03FixWindow(Method *method)
RS03UpdateFixResults(wl, 0, 0);
if(wl->fixCurve && wl->fixCurve->widget)
{ gdk_window_clear(gtk_widget_get_window(wl->fixCurve->widget));
redraw_curve(wl);
}
gtk_widget_queue_draw(wl->fixCurve->widget);
wl->percent = 0;
wl->lastPercent = 0;