File tree Expand file tree Collapse file tree 2 files changed +23
-20
lines changed
Expand file tree Collapse file tree 2 files changed +23
-20
lines changed Original file line number Diff line number Diff line change @@ -204,21 +204,23 @@ void CalibrationArea::redraw()
204204
205205bool CalibrationArea::on_timer_signal ()
206206{
207- time_elapsed += time_step;
208- if (time_elapsed > max_time) {
209- exit (0 );
210- }
211-
212- // Update clock
213- Glib::RefPtr<Gdk::Window> win = get_window ();
214- if (win) {
215- const Gdk::Rectangle rect (display_width/2 - clock_radius - clock_line_width,
216- display_height/2 - clock_radius - clock_line_width,
217- 2 * clock_radius + 1 + 2 * clock_line_width,
218- 2 * clock_radius + 1 + 2 * clock_line_width);
219- win->invalidate_rect (rect, false );
207+ if (calibrator->get_use_timeout ()) {
208+ time_elapsed += time_step;
209+ if (time_elapsed > max_time) {
210+ exit (0 );
211+ }
212+
213+ // Update clock
214+ Glib::RefPtr<Gdk::Window> win = get_window ();
215+ if (win) {
216+ const Gdk::Rectangle rect (display_width/2 - clock_radius - clock_line_width,
217+ display_height/2 - clock_radius - clock_line_width,
218+ 2 * clock_radius + 1 + 2 * clock_line_width,
219+ 2 * clock_radius + 1 + 2 * clock_line_width);
220+ win->invalidate_rect (rect, false );
221+ }
220222 }
221-
223+
222224 return true ;
223225}
224226
Original file line number Diff line number Diff line change @@ -293,13 +293,14 @@ bool GuiCalibratorX11::on_expose_event()
293293
294294bool GuiCalibratorX11::on_timer_signal ()
295295{
296- time_elapsed += time_step;
297- if (time_elapsed > max_time) {
298- exit (0 );
299- }
300-
301296 // Update clock
302- if (calibrator->get_use_timeout ()){
297+ if (calibrator->get_use_timeout ()) {
298+
299+ time_elapsed += time_step;
300+ if (time_elapsed > max_time) {
301+ exit (0 );
302+ }
303+
303304 XSetForeground (display, gc, pixel[BLACK]);
304305 XSetLineAttributes (display, gc, clock_line_width,
305306 LineSolid, CapButt, JoinMiter);
You can’t perform that action at this time.
0 commit comments