From: Till Theato Date: Thu, 3 Mar 2011 19:52:17 +0000 (+0000) Subject: Fix effect parameters disabled when they should not be X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7c00cf22ccf43c31652a16cbf73d58bae8d8b5c2;p=kdenlive Fix effect parameters disabled when they should not be svn path=/trunk/kdenlive/; revision=5470 --- diff --git a/src/effectstackedit.cpp b/src/effectstackedit.cpp index 24bc2275..a7a220b5 100644 --- a/src/effectstackedit.cpp +++ b/src/effectstackedit.cpp @@ -94,7 +94,13 @@ EffectStackEdit::EffectStackEdit(Monitor *monitor, QWidget *parent) : QColor hover_bg = scheme.decoration(KColorScheme::HoverColor).color(); QColor light_bg = scheme.shade(KColorScheme::LightShade); - QString stylesheet(QString("QProgressBar:horizontal {border: 1px solid %1;border-radius:0px;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right: 0px;background:%4;padding: 0px;text-align:left center} QProgressBar:horizontal#dragOnly {background: %1} QProgressBar:horizontal:hover#dragOnly {background: %3} QProgressBar:horizontal:hover {border: 1px solid %3;border-right: 0px;} QProgressBar::chunk:horizontal {background: %1;} QProgressBar::chunk:horizontal:hover {background: %3;} QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %4;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;} QAbstractSpinBox#dragBox {border: 1px solid %1;border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QAbstractSpinBox::down-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox::up-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %2;} QAbstractSpinBox:hover#dragBox {border: 1px solid %3;} ").arg(dark_bg.name()).arg(selected_bg.name()).arg(hover_bg.name()).arg(light_bg.name())); + QString stylesheet(QString("QProgressBar:horizontal {border: 1px solid %1;border-radius:0px;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right: 0px;background:%4;padding: 0px;text-align:left center}\ + QProgressBar:horizontal#dragOnly {background: %1} QProgressBar:horizontal:hover#dragOnly {background: %3} QProgressBar:horizontal:hover {border: 1px solid %3;border-right: 0px;}\ + QProgressBar::chunk:horizontal {background: %1;} QProgressBar::chunk:horizontal:hover {background: %3;}\ + QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %4;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;}\ + QAbstractSpinBox#dragBox {border: 1px solid %1;border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QAbstractSpinBox::down-button#dragBox {width:0px;padding:0px;}\ + QAbstractSpinBox::up-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %2;} QAbstractSpinBox:hover#dragBox {border: 1px solid %3;} ") + .arg(dark_bg.name()).arg(selected_bg.name()).arg(hover_bg.name()).arg(light_bg.name())); setStyleSheet(stylesheet); setWidget(m_baseWidget); @@ -206,7 +212,7 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, in m_in = in; m_out = out; if (m_params.isNull()) { - kDebug() << "// EMPTY EFFECT STACK"; +// kDebug() << "// EMPTY EFFECT STACK"; return; } diff --git a/src/effectstackview.cpp b/src/effectstackview.cpp index 4f08611f..02f26b87 100644 --- a/src/effectstackview.cpp +++ b/src/effectstackview.cpp @@ -232,7 +232,6 @@ void EffectStackView::slotItemChanged(QListWidgetItem *item) { bool disable = true; if (item->checkState() == Qt::Checked) disable = false; - m_ui.frame->setEnabled(!disable); m_ui.buttonReset->setEnabled(!disable); int activeRow = m_ui.effectlist->currentRow(); if (activeRow >= 0) { @@ -486,7 +485,7 @@ void EffectStackView::slotCheckAll(int state) void EffectStackView::slotCheckMonitorPosition(int renderPos) { - if (m_trackMode || (renderPos >= m_clipref->startPos().frames(KdenliveSettings::project_fps()) && renderPos <= m_clipref->endPos().frames(KdenliveSettings::project_fps()))) { + if (m_trackMode || (m_clipref && renderPos >= m_clipref->startPos().frames(KdenliveSettings::project_fps()) && renderPos <= m_clipref->endPos().frames(KdenliveSettings::project_fps()))) { if (!m_monitor->getEffectEdit()->getScene()->views().at(0)->isVisible()) m_monitor->slotEffectScene(true); } else { diff --git a/src/onmonitoritems/rotoscoping/splineitem.cpp b/src/onmonitoritems/rotoscoping/splineitem.cpp index e22892c6..fa3c54f9 100644 --- a/src/onmonitoritems/rotoscoping/splineitem.cpp +++ b/src/onmonitoritems/rotoscoping/splineitem.cpp @@ -258,10 +258,11 @@ int SplineItem::getClosestPointOnCurve(QPointF point, double *tFinal) qreal diff = 10000, param = 0; BPoint p1, p2; int curveSegment = 0, j; - for (int i = 0; i < childItems().count(); ++i) { - j = (i + 1) % childItems().count(); - p1 = qgraphicsitem_cast(childItems().at(i))->getPoint(); - p2 = qgraphicsitem_cast(childItems().at(j))->getPoint(); + QList items = childItems(); + for (int i = 0; i < items.count(); ++i) { + j = (i + 1) % items.count(); + p1 = qgraphicsitem_cast(items.at(i))->getPoint(); + p2 = qgraphicsitem_cast(items.at(j))->getPoint(); QPolygonF bounding = QPolygonF() << p1.p << p1.h2 << p2.h1 << p2.p; QPointF cl = closestPointInRect(point, bounding.boundingRect()); #if QT_VERSION >= 0x040600