m_params.at(columnId).attribute("min").toInt(), m_params.at(columnId).attribute("max").toInt(),
m_params.at(columnId).attribute("default").toInt(), comment, m_params.at(columnId).attribute("suffix"), this);
connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int)));
- connect(this, SIGNAL(showComments()), doubleparam, SLOT(slotShowComment()));
+ connect(this, SIGNAL(showComments(bool)), doubleparam, SLOT(slotShowComment(bool)));
m_slidersLayout->addWidget(doubleparam, columnId, 0);
QRadioButton *radio = new QRadioButton(this);
+ radio->setToolTip(i18n("Show %1 in timeline").arg(paramName));
m_showButtons->addButton(radio, columnId);
if (e.attribute("intimeline") == "1")
radio->setChecked(true);
- QVBoxLayout *radioLayout = new QVBoxLayout(this);
+ QVBoxLayout *radioLayout = new QVBoxLayout;
radioLayout->addWidget(radio, 0, Qt::AlignTop);
m_slidersLayout->addLayout(radioLayout, columnId, 1);
result = m_min;
}
} else {
- int pos2 = getPos(row - 1);
- result = pos2 + (pos1 - pos2) / 2;
+ if (pos1 < m_max - 1) {
+ // last keyframe selected and it is not at end of clip -> add keyframe at the end
+ result = m_max - 1;
+ newrow++;
+ } else {
+ int pos2 = getPos(row - 1);
+ result = pos2 + (pos1 - pos2) / 2;
+ }
}
keyframe_list->insertRow(newrow);
continue;
int val = doubleparam->getValue();
QTableWidgetItem *nitem = keyframe_list->item(item->row(), col);
- if (nitem->text().toInt() != val)
+ if (nitem && nitem->text().toInt() != val)
nitem->setText(QString::number(val));
}
//keyframe_list->item(item->row() - 1, item->column());
return;
}
- slotUpdateVisibleParameter(0, false);
- QRadioButton *radio = static_cast<QRadioButton*>(m_slidersLayout->itemAtPosition(0, 1)->widget());
+ slotUpdateVisibleParameter(0);
+ QRadioButton *radio = static_cast<QRadioButton*>(m_slidersLayout->itemAtPosition(0, 1)->layout()->itemAt(0)->widget());
if (radio)
radio->setChecked(true);
}