Skip to content

Commit

Permalink
Fixed zero padding in timecode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Karlsson authored and dotarmin committed Jun 25, 2020
1 parent dd77f65 commit 22c838b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Common/Timecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ QString Timecode::fromTime(double time, double fps, bool useDropFrameNotation)
seconds = (int)(time - hour * 3600 - minutes * 60);
frames = (int)((time - hour * 3600 - minutes * 60 - seconds) * fps);

return QString("%1%2%3%4%5").arg(hour, 2, 16)
.arg(minutes, 2, 16)
.arg(seconds, 2, 16)
return QString("%1:%2:%3%4%5").arg(hour, 2, 10, QChar('0'))
.arg(minutes, 2, 10, QChar('0'))
.arg(seconds, 2, 10, QChar('0'))
.arg(useDropFrameNotation ? "." : ":")
.arg(frames, 2, 16);
.arg(frames, 2, 10, QChar('0'));
}
2 changes: 1 addition & 1 deletion src/Widgets/Library/LibraryWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ LibraryWidget::LibraryWidget(QWidget* parent)
this->treeWidgetVideo->setColumnHidden(3, true);
this->treeWidgetVideo->setColumnHidden(4, true);
this->treeWidgetVideo->setColumnHidden(5, true);
this->treeWidgetVideo->setColumnWidth(6, 71);
this->treeWidgetVideo->setColumnWidth(6, 75);

this->treeWidgetData->setColumnHidden(1, true);
this->treeWidgetData->setColumnHidden(2, true);
Expand Down

0 comments on commit 22c838b

Please sign in to comment.