| 109 | } |
| 110 | |
| 111 | void VideoBox::UpdateTimeBoxes() { |
| 112 | if (!context->project->VideoProvider()) return; |
| 113 | |
| 114 | int frame = context->videoController->GetFrameN(); |
| 115 | int time = context->videoController->TimeAtFrame(frame, agi::vfr::EXACT); |
| 116 | |
| 117 | // Set the text box for frame number and time |
| 118 | VideoPosition->SetValue(fmt_wx("%s - %d", agi::Time(time).GetAssFormatted(true), frame)); |
| 119 | if (boost::binary_search(context->project->Keyframes(), frame)) { |
| 120 | // Set the background color to indicate this is a keyframe |
| 121 | VideoPosition->SetBackgroundColour(to_wx(OPT_GET("Colour/Subtitle Grid/Background/Selection")->GetColor())); |
| 122 | VideoPosition->SetForegroundColour(to_wx(OPT_GET("Colour/Subtitle Grid/Selection")->GetColor())); |
| 123 | } |
| 124 | else { |
| 125 | VideoPosition->SetBackgroundColour(wxNullColour); |
| 126 | VideoPosition->SetForegroundColour(wxNullColour); |
| 127 | } |
| 128 | |
| 129 | AssDialogue *active_line = context->selectionController->GetActiveLine(); |
| 130 | if (!active_line) |
| 131 | VideoSubsPos->SetValue(""); |
| 132 | else { |
| 133 | VideoSubsPos->SetValue(fmt_wx( |
| 134 | "%+dms; %+dms", |
| 135 | time - active_line->Start, |
| 136 | time - active_line->End)); |
| 137 | } |
| 138 | } |
nothing calls this directly
no test coverage detected