mirror of https://github.com/odrling/Aegisub
Merge branch 'misc' into feature
This commit is contained in:
commit
ba9f48a0e5
|
@ -134,14 +134,10 @@ void BaseGrid::OnSubtitlesCommit(int type) {
|
||||||
if (type == AssFile::COMMIT_NEW || type & AssFile::COMMIT_ORDER || type & AssFile::COMMIT_DIAG_ADDREM || type & AssFile::COMMIT_FOLD)
|
if (type == AssFile::COMMIT_NEW || type & AssFile::COMMIT_ORDER || type & AssFile::COMMIT_DIAG_ADDREM || type & AssFile::COMMIT_FOLD)
|
||||||
UpdateMaps();
|
UpdateMaps();
|
||||||
|
|
||||||
if (type & AssFile::COMMIT_DIAG_META) {
|
if (type & AssFile::COMMIT_DIAG_META || type & AssFile::COMMIT_DIAG_TIME) {
|
||||||
SetColumnWidths();
|
SetColumnWidths();
|
||||||
Refresh(false);
|
Refresh(false);
|
||||||
return;
|
} else if (type & AssFile::COMMIT_DIAG_TEXT) {
|
||||||
}
|
|
||||||
if (type & AssFile::COMMIT_DIAG_TIME)
|
|
||||||
Refresh(false);
|
|
||||||
else if (type & AssFile::COMMIT_DIAG_TEXT) {
|
|
||||||
for (auto const& rect : text_refresh_rects)
|
for (auto const& rect : text_refresh_rects)
|
||||||
RefreshRect(rect, false);
|
RefreshRect(rect, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,10 +204,10 @@ struct GridColumnStartTime final : GridColumnTime {
|
||||||
}
|
}
|
||||||
|
|
||||||
int Width(const agi::Context *c, WidthHelper &helper) const override {
|
int Width(const agi::Context *c, WidthHelper &helper) const override {
|
||||||
|
agi::Time max_time = max_value(&AssDialogue::Start, c->ass->Events);
|
||||||
if (!by_frame)
|
if (!by_frame)
|
||||||
return helper(wxS("0:00:00.00"));
|
return helper(max_time.GetAssFormatted());
|
||||||
int frame = c->videoController->FrameAtTime(max_value(&AssDialogue::Start, c->ass->Events), agi::vfr::START);
|
return helper(std::to_wstring(c->videoController->FrameAtTime(max_time, agi::vfr::START)));
|
||||||
return helper(std::to_wstring(frame));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -222,10 +222,10 @@ struct GridColumnEndTime final : GridColumnTime {
|
||||||
}
|
}
|
||||||
|
|
||||||
int Width(const agi::Context *c, WidthHelper &helper) const override {
|
int Width(const agi::Context *c, WidthHelper &helper) const override {
|
||||||
|
agi::Time max_time = max_value(&AssDialogue::End, c->ass->Events);
|
||||||
if (!by_frame)
|
if (!by_frame)
|
||||||
return helper(wxS("0:00:00.00"));
|
return helper(max_time.GetAssFormatted());
|
||||||
int frame = c->videoController->FrameAtTime(max_value(&AssDialogue::End, c->ass->Events), agi::vfr::END);
|
return helper(std::to_wstring(c->videoController->FrameAtTime(max_time, agi::vfr::END)));
|
||||||
return helper(std::to_wstring(frame));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue