fixed selecting bug
This commit is contained in:
+10
-17
@@ -140,17 +140,6 @@ void TimelineWidget::dropEvent(QDropEvent* event) {
|
||||
c->effects.append(create_effect(AUDIO_PAN_EFFECT, c));
|
||||
}
|
||||
|
||||
/*
|
||||
* TEMP DEBUG CODE TO REMOVE LATER
|
||||
*/
|
||||
|
||||
c->opening_transition = new CrossDissolveTransition();
|
||||
c->closing_transition = new CrossDissolveTransition();
|
||||
|
||||
/*
|
||||
* END OF TEMP DEBUG CODE
|
||||
*/
|
||||
|
||||
sequence->add_clip(c);
|
||||
added_clips.append(c);
|
||||
}
|
||||
@@ -219,11 +208,6 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
|
||||
track_resize_mouse_cache = event->pos().y();
|
||||
panel_timeline->moving_init = true;
|
||||
} else {
|
||||
// if "shift" is not down
|
||||
if (!shift) {
|
||||
panel_timeline->selections.clear();
|
||||
}
|
||||
|
||||
if (clip_index >= 0) {
|
||||
Clip* c = sequence->get_clip(clip_index);
|
||||
if (panel_timeline->is_clip_selected(c)) {
|
||||
@@ -231,6 +215,11 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
|
||||
// TODO if shift is down, deselect it
|
||||
}
|
||||
} else {
|
||||
// if "shift" is not down
|
||||
if (!shift) {
|
||||
panel_timeline->selections.clear();
|
||||
}
|
||||
|
||||
Clip* clip = sequence->get_clip(clip_index);
|
||||
if (clip != NULL) {
|
||||
panel_timeline->selections.append({clip->timeline_in, clip->timeline_out, clip->track});
|
||||
@@ -248,6 +237,11 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
|
||||
}
|
||||
panel_timeline->moving_init = true;
|
||||
} else {
|
||||
// if "shift" is not down
|
||||
if (!shift) {
|
||||
panel_timeline->selections.clear();
|
||||
}
|
||||
|
||||
panel_timeline->rect_select_init = true;
|
||||
}
|
||||
panel_timeline->repaint_timeline();
|
||||
@@ -367,7 +361,6 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
|
||||
panel_timeline->ripple(ripple_point, -ripple_length);
|
||||
}
|
||||
}
|
||||
|
||||
panel_timeline->redraw_all_clips(true);
|
||||
} else if (panel_timeline->selecting) {
|
||||
// remove duplicate selections
|
||||
|
||||
+2
-8
@@ -29,7 +29,7 @@ ViewerWidget::ViewerWidget(QWidget *parent) : QOpenGLWidget(parent)
|
||||
setFormat(format);
|
||||
|
||||
// error handler - retries after 200ms if we couldn't get the entire image
|
||||
retry_timer.setInterval(200);
|
||||
retry_timer.setInterval(250);
|
||||
connect(&retry_timer, SIGNAL(timeout()), this, SLOT(retry()));
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ void ViewerWidget::initializeGL() {
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glEnable(GL_BLEND);
|
||||
// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
//void ViewerWidget::resizeGL(int w, int h)
|
||||
@@ -55,8 +54,7 @@ void ViewerWidget::paintEvent(QPaintEvent *e) {
|
||||
if (enable_paint) QOpenGLWidget::paintEvent(e);
|
||||
}
|
||||
|
||||
void ViewerWidget::paintGL()
|
||||
{
|
||||
void ViewerWidget::paintGL() {
|
||||
bool loop = true;
|
||||
while (loop) {
|
||||
loop = false;
|
||||
@@ -188,10 +186,6 @@ void ViewerWidget::paintGL()
|
||||
}
|
||||
}
|
||||
|
||||
/*QPainter p(this);
|
||||
p.drawText({0, 0, 200, 200}, "text!");
|
||||
p.end();*/
|
||||
|
||||
if (texture_failed) {
|
||||
if (multithreaded) {
|
||||
retry_timer.start();
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
#include <QMatrix4x4>
|
||||
#include <QOpenGLTexture>
|
||||
#include <QTimer>
|
||||
|
||||
struct Clip;
|
||||
|
||||
class Viewer;
|
||||
@@ -14,7 +15,7 @@ class ViewerWidget : public QOpenGLWidget, public QOpenGLFunctions
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ViewerWidget(QWidget *parent = 0);
|
||||
ViewerWidget(QWidget *parent = 0);
|
||||
|
||||
bool multithreaded;
|
||||
bool force_audio;
|
||||
|
||||
Reference in New Issue
Block a user