Add the curly braces in AssDialogueBlockOverride::GetText
All of the calling code added them, so there's no reason not to just do it in one place.
This commit is contained in:
parent
17ffacb6a0
commit
c1ed667025
3 changed files with 5 additions and 10 deletions
|
@ -289,14 +289,8 @@ void AssDialogue::StripTag(wxString const& tag_name) {
|
|||
void AssDialogue::UpdateText(boost::ptr_vector<AssDialogueBlock>& blocks) {
|
||||
if (blocks.empty()) return;
|
||||
Text.clear();
|
||||
for (auto& block : blocks) {
|
||||
if (block.GetType() == BLOCK_OVERRIDE) {
|
||||
Text += "{";
|
||||
for (auto& block : blocks)
|
||||
Text += block.GetText();
|
||||
Text += "}";
|
||||
}
|
||||
else Text += block.GetText();
|
||||
}
|
||||
}
|
||||
|
||||
void AssDialogue::SetMarginString(wxString const& origvalue, int which) {
|
||||
|
|
|
@ -92,9 +92,10 @@ void AssDialogueBlockOverride::AddTag(wxString const& tag) {
|
|||
}
|
||||
|
||||
wxString AssDialogueBlockOverride::GetText() {
|
||||
text.clear();
|
||||
text = "{";
|
||||
for (auto tag : Tags)
|
||||
text += *tag;
|
||||
text += "}";
|
||||
return text;
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ void DialogTranslation::UpdateDisplay() {
|
|||
}
|
||||
}
|
||||
else if (block.GetType() == BLOCK_OVERRIDE)
|
||||
original_text->AppendText("{" + block.GetText() + "}");
|
||||
original_text->AppendText(block.GetText());
|
||||
++i;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue