mirror of https://github.com/odrling/Aegisub
Remove the pad argument from GetMarginString
It's no longer ever actually set to true.
This commit is contained in:
parent
3045e2d012
commit
b507f49cec
|
@ -331,9 +331,9 @@ void AssDialogue::SetMarginString(wxString const& origvalue, int which) {
|
|||
Margin[which] = mid<int>(0, value, 9999);
|
||||
}
|
||||
|
||||
wxString AssDialogue::GetMarginString(int which, bool pad) const {
|
||||
wxString AssDialogue::GetMarginString(int which) const {
|
||||
if (which < 0 || which > 2) throw InvalidMarginIdError();
|
||||
return wxString::Format(pad ? "%04d" : "%d", Margin[which]);
|
||||
return wxString::Format("%d", Margin[which]);
|
||||
}
|
||||
|
||||
void AssDialogue::ProcessParameters(AssDialogueBlockOverride::ProcessParametersCallback callback,void *userData) {
|
||||
|
|
|
@ -182,8 +182,7 @@ public:
|
|||
void SetMarginString(wxString const& value, int which);
|
||||
/// @brief Get a margin
|
||||
/// @param which 0 = left, 1 = right, 2 = vertical
|
||||
/// @param pad Pad the number to four digits
|
||||
wxString GetMarginString(int which, bool pad=true) const;
|
||||
wxString GetMarginString(int which) const;
|
||||
/// Get the line as SSA rather than ASS
|
||||
wxString GetSSAText() const override;
|
||||
/// Does this line collide with the passed line?
|
||||
|
|
|
@ -210,7 +210,7 @@ wxTextCtrl *SubsEditBox::MakeMarginCtrl(wxString const& tooltip, int margin, wxS
|
|||
Bind(wxEVT_COMMAND_TEXT_UPDATED, [=](wxCommandEvent&) {
|
||||
wxString value = ctrl->GetValue();
|
||||
SetSelectedRows([&](AssDialogue *d) { d->SetMarginString(value, margin); }, commit_msg, AssFile::COMMIT_DIAG_META);
|
||||
if (line) change_value(ctrl, line->GetMarginString(margin, false));
|
||||
if (line) change_value(ctrl, line->GetMarginString(margin));
|
||||
}, ctrl->GetId());
|
||||
|
||||
return ctrl;
|
||||
|
@ -292,7 +292,7 @@ void SubsEditBox::OnCommit(int type) {
|
|||
if (type & AssFile::COMMIT_DIAG_META) {
|
||||
Layer->SetValue(line->Layer);
|
||||
for (size_t i = 0; i < Margin.size(); ++i)
|
||||
change_value(Margin[i], line->GetMarginString(i, false));
|
||||
change_value(Margin[i], line->GetMarginString(i));
|
||||
CommentBox->SetValue(line->Comment);
|
||||
StyleBox->Select(StyleBox->FindString(line->Style));
|
||||
|
||||
|
|
Loading…
Reference in New Issue