Skip to content

Commit

Permalink
Update markereditor.cpp
Browse files Browse the repository at this point in the history
Adding new marker should always use scene current frame.
  • Loading branch information
rodlie committed Nov 12, 2024
1 parent d5fa74b commit b271e07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ui/widgets/markereditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ void MarkerEditor::setup()
connect(addButton, &QPushButton::clicked,
this, [this]() {
auto item = new QTreeWidgetItem(mTree);
item->setText(1, "0");
item->setText(0, "0");
item->setData(0, Qt::UserRole, 0);
const int frame = mScene ? mScene->getCurrentFrame() : 0;
item->setText(1, QString::number(frame));
item->setText(0, QString::number(frame));
item->setData(0, Qt::UserRole, frame);
item->setCheckState(0, Qt::Checked);
item->setFlags(item->flags() | Qt::ItemIsEditable);
mTree->addTopLevelItem(item);
Expand Down

0 comments on commit b271e07

Please sign in to comment.