错误处理
This commit is contained in:
+6
-2
@@ -43,8 +43,12 @@ void Abs_Plot_Private::attach_widget(Abs_Plot* plot) {
|
||||
timer = new QTimer(plot);
|
||||
timer->setTimerType(Qt::PreciseTimer);
|
||||
QObject::connect(timer, &QTimer::timeout, plot, [this] {
|
||||
if (scene->view_active())
|
||||
(void)scene->render_frame();
|
||||
if (!scene->view_active())
|
||||
return;
|
||||
const auto error = scene->render_frame();
|
||||
if (error == Plot_Render_Error::external_failure ||
|
||||
error == Plot_Render_Error::scene_shutting_down)
|
||||
timer->stop();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user