From 342e4c765a71daad6e12741eb73a003fabe6f20e Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 10 Jan 2019 09:31:42 +1100 Subject: [PATCH] timeline middle click moving and more glsl debugging info --- project/effect.cpp | 26 +++++++++++++++++++------- ui/timelinewidget.cpp | 7 +++++-- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/project/effect.cpp b/project/effect.cpp index 9a872d57f..fefb2e627 100644 --- a/project/effect.cpp +++ b/project/effect.cpp @@ -793,16 +793,28 @@ void Effect::open() { validate_meta_path(); bool glsl_compiled = true; if (!vertPath.isEmpty()) { - if (!glslProgram->addShaderFromSourceFile(QOpenGLShader::Vertex, meta->path + "/" + vertPath)) { - glsl_compiled = false; - } + if (glslProgram->addShaderFromSourceFile(QOpenGLShader::Vertex, meta->path + "/" + vertPath)) { + dout << "[INFO] Vertex shader added successfully"; + } else { + glsl_compiled = false; + dout << "[WARNING] Vertex shader could not be added"; + } } if (!fragPath.isEmpty()) { - if (!glslProgram->addShaderFromSourceFile(QOpenGLShader::Fragment, meta->path + "/" + fragPath)) { - glsl_compiled = false; - } + if (glslProgram->addShaderFromSourceFile(QOpenGLShader::Fragment, meta->path + "/" + fragPath)) { + dout << "[INFO] Fragment shader added successfully"; + } else { + glsl_compiled = false; + dout << "[WARNING] Fragment shader could not be added"; + } } - if (glsl_compiled) glslProgram->link(); + if (glsl_compiled) { + if (glslProgram->link()) { + dout << "[INFO] Shader program linked successfully"; + } else { + dout << "[WARNING] Shader program failed to link"; + } + } isOpen = true; } } else { diff --git a/ui/timelinewidget.cpp b/ui/timelinewidget.cpp index d56a36765..34896859a 100644 --- a/ui/timelinewidget.cpp +++ b/ui/timelinewidget.cpp @@ -554,7 +554,10 @@ bool isLiveEditing() { void TimelineWidget::mousePressEvent(QMouseEvent *event) { if (sequence != NULL) { int tool = panel_timeline->tool; - if (event->button() == Qt::RightButton) { + if (event->button() == Qt::MiddleButton) { + tool = TIMELINE_TOOL_HAND; + panel_timeline->creating = false; + } else if (event->button() == Qt::RightButton) { tool = TIMELINE_TOOL_MENU; panel_timeline->creating = false; } @@ -1155,12 +1158,12 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) { panel_timeline->rect_select_proc = false; panel_timeline->transition_tool_init = false; panel_timeline->transition_tool_proc = false; - panel_timeline->hand_moving = false; pre_clips.clear(); post_clips.clear(); update_ui(true); } + panel_timeline->hand_moving = false; } }