#include "docclipbase.h"
#include "projectlist.h"
#include "kthumb.h"
+#include "monitoreditwidget.h"
#include "monitorscene.h"
#include "kdenlivesettings.h"
connect(m_effectedit, SIGNAL(displayMessage(const QString&, int)), this, SIGNAL(displayMessage(const QString&, int)));
connect(m_effectedit, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
connect(monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
- connect(this, SIGNAL(showComments()), m_effectedit, SIGNAL(showComments()));
+ connect(this, SIGNAL(showComments(bool)), m_effectedit, SIGNAL(showComments(bool)));
m_effectLists["audio"] = &MainWindow::audioEffects;
m_effectLists["video"] = &MainWindow::videoEffects;
m_effectLists["custom"] = &MainWindow::customEffects;
m_ui.buttonShowComments->setEnabled(false);
m_ui.labelComment->setHidden(true);
} else {
- qMin(ix, 0);
- qMax(ix, m_ui.effectlist->count() - 1);
+ ix = qBound(0, ix, m_ui.effectlist->count() - 1);
m_ui.effectlist->setCurrentRow(ix);
m_ui.checkAll->setEnabled(true);
}
int activeRow = m_ui.effectlist->currentRow();
bool isChecked = false;
if (hasItem && m_ui.effectlist->currentItem()->checkState() == Qt::Checked) isChecked = true;
+ QDomElement eff;
if (hasItem && m_ui.effectlist->currentItem()->isSelected()) {
- QDomElement eff = m_currentEffectList.at(activeRow);
+ eff = m_currentEffectList.at(activeRow);
if (m_trackMode) {
// showing track effects
m_effectedit->transferParamDesc(eff, 0, 0, m_trackInfo.duration);
m_ui.frame->setEnabled(isChecked);
m_ui.buttonShowComments->setEnabled(hasItem);
- if (m_ui.buttonShowComments->isChecked())
- emit showComments();
- m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count() || !hasItem);
+ emit showComments(m_ui.buttonShowComments->isChecked());
+ m_ui.labelComment->setVisible(hasItem && m_ui.labelComment->text().count() && (m_ui.buttonShowComments->isChecked() || !eff.elementsByTagName("parameter").count()));
}
void EffectStackView::slotItemUp()
}
}
- if (m_ui.buttonShowComments->isChecked())
- emit showComments();
+ emit showComments(m_ui.buttonShowComments->isChecked());
m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count());
}
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_monitor->getEffectScene()->views().at(0)->isVisible())
+ if (!m_monitor->getEffectEdit()->getScene()->views().at(0)->isVisible())
m_monitor->slotEffectScene(true);
} else {
m_monitor->slotEffectScene(false);
void EffectStackView::slotShowComments()
{
m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count());
- emit showComments();
+ emit showComments(m_ui.buttonShowComments->isChecked());
}
#include "effectstackview.moc"