错误处理

This commit is contained in:
2026-08-16 17:53:46 +08:00
parent 00a3c54820
commit 8612b5ff86
47 changed files with 744 additions and 544 deletions
+6 -2
View File
@@ -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();
});
}