corrected some semantics

This commit is contained in:
itsmattkc
2018-11-20 19:52:09 +11:00
parent ee683fd6d1
commit bf0874dbe5
2 changed files with 10 additions and 7 deletions
+7 -4
View File
@@ -47,10 +47,13 @@ SolidEffect::SolidEffect(Clip* c, const EffectMeta* em) : Effect(c, em) {
connect(opacity_field, SIGNAL(changed()), this, SLOT(field_changed()));
connect(checkerboard_size_field, SIGNAL(changed()), this, SLOT(field_changed()));
connect(static_cast<QComboBox*>(solid_type->get_ui_element()), SIGNAL(currentIndexChanged(int)), this, SLOT(ui_update(int)));
// hacky but eh
QComboBox* solid_type_combo = static_cast<QComboBox*>(solid_type->get_ui_element());
connect(solid_type_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(ui_update(int)));
ui_update(solid_type_combo->currentIndex());
vertPath = ":/shaders/common.vert";
fragPath = ":/shaders/solideffect.frag";
/*vertPath = ":/shaders/common.vert";
fragPath = ":/shaders/solideffect.frag";*/
}
void SolidEffect::redraw(double timecode) {
@@ -178,6 +181,6 @@ void SolidEffect::redraw(double timecode) {
}
void SolidEffect::ui_update(int i) {
solid_color_field->set_enabled(i == SOLID_TYPE_COLOR);
solid_color_field->set_enabled(i == SOLID_TYPE_COLOR || i == SOLID_TYPE_CHECKERBOARD);
checkerboard_size_field->set_enabled(i == SOLID_TYPE_CHECKERBOARD);
}
+3 -3
View File
@@ -44,8 +44,8 @@ ViewerWidget::ViewerWidget(QWidget *parent) :
format.setDepthBufferSize(24);
setFormat(format);
// error handler - retries after 500ms if we couldn't get the entire image
retry_timer.setInterval(500);
// error handler - retries after 50ms if we couldn't get the entire image
retry_timer.setInterval(50);
connect(&retry_timer, SIGNAL(timeout()), this, SLOT(retry()));
setContextMenuPolicy(Qt::CustomContextMenu);
@@ -137,7 +137,7 @@ void ViewerWidget::mouseMoveEvent(QMouseEvent* event) {
} else {
QDrag* drag = new QDrag(this);
QMimeData* mimeData = new QMimeData;
mimeData->setText("h");
mimeData->setText("h"); // QMimeData will fail without some kind of data
drag->setMimeData(mimeData);
drag->exec();
}