mirror of
https://github.com/leozide/leocad.git
synced 2026-07-27 19:56:49 +00:00
Fixed crash with move to step after on the last step. Fixes #844.
This commit is contained in:
@@ -466,6 +466,14 @@ void lcTimelineWidget::MoveSelectionAfter()
|
||||
|
||||
gMainWindow->GetActiveModel()->InsertStep(Step);
|
||||
|
||||
for (int TopLevelItemIdx = topLevelItemCount(); TopLevelItemIdx < Step; TopLevelItemIdx++)
|
||||
{
|
||||
QTreeWidgetItem* StepItem = new QTreeWidgetItem(this, QStringList(tr("Step %1").arg(TopLevelItemIdx + 1)));
|
||||
StepItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
|
||||
addTopLevelItem(StepItem);
|
||||
StepItem->setExpanded(true);
|
||||
}
|
||||
|
||||
CurrentItem = topLevelItem(Step - 1);
|
||||
|
||||
for (QTreeWidgetItem* PieceItem : SelectedItems)
|
||||
|
||||
Reference in New Issue
Block a user