MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / paste_over

Function paste_over

src/command/edit.cpp:142–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142bool paste_over(wxWindow *parent, std::vector<bool>& pasteOverOptions, AssDialogue &new_line, AssDialogue &old_line) {
143 if (pasteOverOptions.empty()) {
144 if (!ShowPasteOverDialog(parent)) return false;
145 pasteOverOptions = OPT_GET("Tool/Paste Lines Over/Fields")->GetListBool();
146 }
147
148 if (pasteOverOptions[0]) old_line.Comment = new_line.Comment;
149 if (pasteOverOptions[1]) old_line.Layer = new_line.Layer;
150 if (pasteOverOptions[2]) old_line.Start = new_line.Start;
151 if (pasteOverOptions[3]) old_line.End = new_line.End;
152 if (pasteOverOptions[4]) old_line.Style = new_line.Style;
153 if (pasteOverOptions[5]) old_line.Actor = new_line.Actor;
154 if (pasteOverOptions[6]) old_line.Margin[0] = new_line.Margin[0];
155 if (pasteOverOptions[7]) old_line.Margin[1] = new_line.Margin[1];
156 if (pasteOverOptions[8]) old_line.Margin[2] = new_line.Margin[2];
157 if (pasteOverOptions[9]) old_line.Effect = new_line.Effect;
158 if (pasteOverOptions[10]) old_line.Text = new_line.Text;
159
160 return true;
161}
162
163struct parsed_line {
164 AssDialogue *line;

Callers 1

operator()Function · 0.85

Calls 1

ShowPasteOverDialogFunction · 0.85

Tested by

no test coverage detected