should have fixed the contexts when undocking panel

This commit is contained in:
itsmattkc
2019-01-17 21:29:07 +11:00
parent 6ad1b2923d
commit be9c6727fa
2 changed files with 11 additions and 2 deletions
+4 -1
View File
@@ -25,13 +25,16 @@ public:
void start_render(QOpenGLContext* share, Sequence* s, const QString &save = nullptr, GLvoid *pixels = nullptr, int idivider = 0);
bool did_texture_fail();
void cancel();
public slots:
// cleanup functions
void delete_ctx();
signals:
void ready();
private:
// cleanup functions
void delete_texture();
void delete_fbo();
void delete_ctx();
QWaitCondition waitCond;
QOffscreenSurface surface;
+7 -1
View File
@@ -253,9 +253,16 @@ void ViewerWidget::seek_from_click(int x) {
}
void ViewerWidget::context_destroy() {
makeCurrent();
if (viewer->seq != nullptr) {
closeActiveClips(viewer->seq);
}
if (window != nullptr) {
delete window;
}
//QMetaObject::invokeMethod(renderer, "delete_ctx", Qt::QueuedConnection);
renderer->delete_ctx();
doneCurrent();
}
EffectGizmo* ViewerWidget::get_gizmo_from_mouse(int x, int y) {
@@ -367,7 +374,6 @@ void ViewerWidget::mouseMoveEvent(QMouseEvent* event) {
void ViewerWidget::mouseReleaseEvent(QMouseEvent *event) {
if (dragging && gizmos != nullptr && !(event->button() == Qt::MiddleButton || panel_timeline->tool == TIMELINE_TOOL_HAND)) {
qDebug() << "gizmos";
move_gizmos(event, true);
}
dragging = false;