Originally committed to SVN as r893.

This commit is contained in:
Dan Donovan 2007-01-26 00:47:42 +00:00
parent a29fcb2d47
commit 4565a18369
21 changed files with 93 additions and 61 deletions

View file

@ -809,7 +809,7 @@ bool AssFile::IsModified() {
///////////////////////// /////////////////////////
// Flag file as modified // Flag file as modified
void AssFile::FlagAsModified() { void AssFile::FlagAsModified(wxString desc) {
// Clear redo // Clear redo
if (!RedoStack.empty()) { if (!RedoStack.empty()) {
//StackPush(); //StackPush();
@ -821,16 +821,17 @@ void AssFile::FlagAsModified() {
} }
Modified = true; Modified = true;
StackPush(); StackPush(desc);
} }
////////////// //////////////
// Stack push // Stack push
void AssFile::StackPush() { void AssFile::StackPush(wxString desc) {
// Places copy on stack // Places copy on stack
AssFile *curcopy = new AssFile(*top); AssFile *curcopy = new AssFile(*top);
curcopy->CompressForStack(true); curcopy->CompressForStack(true);
curcopy->undodescription = desc;
UndoStack.push_back(curcopy); UndoStack.push_back(curcopy);
StackModified = true; StackModified = true;
@ -852,7 +853,11 @@ void AssFile::StackPush() {
// Stack pop // Stack pop
void AssFile::StackPop() { void AssFile::StackPop() {
bool addcopy = false; bool addcopy = false;
wxString undodesc=_T("");
if (StackModified) { if (StackModified) {
undodesc=UndoStack.back()->undodescription;
UndoStack.pop_back(); UndoStack.pop_back();
StackModified = false; StackModified = false;
addcopy = true; addcopy = true;
@ -860,16 +865,18 @@ void AssFile::StackPop() {
if (!UndoStack.empty()) { if (!UndoStack.empty()) {
//delete top; //delete top;
AssFile *undo = UndoStack.back();
top->CompressForStack(true); top->CompressForStack(true);
top->undodescription = undodesc;
RedoStack.push_back(top); RedoStack.push_back(top);
top = UndoStack.back(); top = undo;
top->CompressForStack(false); top->CompressForStack(false);
UndoStack.pop_back(); UndoStack.pop_back();
Popping = true; Popping = true;
} }
if (addcopy) { if (addcopy) {
StackPush(); StackPush(top->undodescription);
} }
} }
@ -896,7 +903,7 @@ void AssFile::StackRedo() {
} }
if (addcopy) { if (addcopy) {
StackPush(); StackPush(top->undodescription);
} }
} }
@ -944,6 +951,14 @@ bool AssFile::IsRedoStackEmpty() {
return RedoStack.empty(); return RedoStack.empty();
} }
wxString AssFile::GetUndoDescription() {
return (IsUndoStackEmpty())?_T(""):(UndoStack.back())->undodescription;
}
wxString AssFile::GetRedoDescription() {
return (IsRedoStackEmpty())?_T(""):(RedoStack.back())->undodescription;
}
////////// //////////
// Global // Global

View file

@ -72,6 +72,7 @@ public:
std::list<AssEntry*> Line; std::list<AssEntry*> Line;
wxString filename; wxString filename;
wxString undodescription;
bool loaded; bool loaded;
AssFile(); AssFile();
@ -79,7 +80,7 @@ public:
~AssFile(); ~AssFile();
bool IsModified(); // Returns if file has unmodified changes bool IsModified(); // Returns if file has unmodified changes
void FlagAsModified(); // Flag file as being modified, will automatically put a copy on stack void FlagAsModified(wxString desc); // Flag file as being modified, will automatically put a copy on stack
void Clear(); // Wipes file void Clear(); // Wipes file
void CompressForStack(bool compress); // Compress/decompress for storage on stack void CompressForStack(bool compress); // Compress/decompress for storage on stack
void LoadDefault(bool defline=true); // Loads default file. Pass false to prevent it from adding a default line too void LoadDefault(bool defline=true); // Loads default file. Pass false to prevent it from adding a default line too
@ -104,14 +105,16 @@ public:
void AddComment(const wxString comment); // Adds a ";" comment under [Script Info]. void AddComment(const wxString comment); // Adds a ";" comment under [Script Info].
int AddLine(wxString data,wxString group,int lasttime,int &version,wxString *outGroup=NULL); int AddLine(wxString data,wxString group,int lasttime,int &version,wxString *outGroup=NULL);
static void StackPop(); // Pop subs from stack and sets 'top' to it static void StackPop(); // Pop subs from stack and sets 'top' to it
static void StackRedo(); // Redoes action on stack static void StackRedo(); // Redoes action on stack
static void StackPush(); // Puts a copy of 'top' on the stack static void StackPush(wxString desc); // Puts a copy of 'top' on the stack
static void StackReset(); // Resets stack. Do this before loading new subtitles. static void StackReset(); // Resets stack. Do this before loading new subtitles.
static bool IsUndoStackEmpty(); // Checks if undo stack is empty static bool IsUndoStackEmpty(); // Checks if undo stack is empty
static bool IsRedoStackEmpty(); // Checks if undo stack is empty static bool IsRedoStackEmpty(); // Checks if undo stack is empty
static bool Popping; // Flags the stack as popping. You must unset this after popping static wxString GetUndoDescription(); // Gets field undodescription from back of UndoStack
static AssFile *top; // Current script file. It is "above" the stack. static wxString GetRedoDescription(); // Gets field undodescription from back of RedoStack
static bool Popping; // Flags the stack as popping. You must unset this after popping
static AssFile *top; // Current script file. It is "above" the stack.
}; };

View file

@ -1041,7 +1041,7 @@ void AudioDisplay::CommitChanges (bool nextLine) {
// Update grid // Update grid
grid->editBox->Update(!karaoke->enabled); grid->editBox->Update(!karaoke->enabled);
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_T(""));
grid->CommitChanges(); grid->CommitChanges();
karaoke->curSyllable = karSyl; karaoke->curSyllable = karSyl;
blockUpdate = false; blockUpdate = false;

View file

@ -888,7 +888,7 @@ namespace Automation4 {
description = wxString(lua_tostring(L, 1), wxConvUTF8); description = wxString(lua_tostring(L, 1), wxConvUTF8);
lua_pop(L, 1); lua_pop(L, 1);
} }
AssFile::top->FlagAsModified(); // TODO: make undo system support description of action undone AssFile::top->FlagAsModified(_T(""));
laf->ass = AssFile::top; // make sure we're still working on the most recent undo point laf->ass = AssFile::top; // make sure we're still working on the most recent undo point
return 0; return 0;

View file

@ -578,7 +578,7 @@ void FontsCollectorThread::Collect() {
// Flag file as modified // Flag file as modified
if (fileModified) { if (fileModified) {
subs->FlagAsModified(); subs->FlagAsModified(_("font attachment"));
collector->main->SubsBox->CommitChanges(); collector->main->SubsBox->CommitChanges();
} }
} }

View file

@ -178,7 +178,7 @@ void DialogKanjiTimer::OnClose(wxCommandEvent &event) {
line->Text = p.second; line->Text = p.second;
} }
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("kanji timing"));
grid->CommitChanges(); grid->CommitChanges();
LinesToChange.clear(); LinesToChange.clear();
Close(); Close();

View file

@ -184,7 +184,7 @@ void DialogProperties::OnOK(wxCommandEvent &event) {
wxString col[2] = { _T("Normal"), _T("Reverse")}; wxString col[2] = { _T("Normal"), _T("Reverse")};
count += SetInfoIfDifferent(_T("Collisions"),col[collision->GetSelection()]); count += SetInfoIfDifferent(_T("Collisions"),col[collision->GetSelection()]);
if (count) AssFile::top->FlagAsModified(); if (count) AssFile::top->FlagAsModified(_("property changes"));
EndModal(count?1:0); EndModal(count?1:0);
} }

View file

@ -233,7 +233,7 @@ void DialogResample::OnResample (wxCommandEvent &event) {
subs->SetScriptInfo(_T("PlayResY"),wxString::Format(_T("%i"),y2)); subs->SetScriptInfo(_T("PlayResY"),wxString::Format(_T("%i"),y2));
// Flag as modified // Flag as modified
subs->FlagAsModified(); subs->FlagAsModified(_("resolution resampling"));
grid->CommitChanges();; grid->CommitChanges();;
EndModal(0); EndModal(0);
} }

View file

@ -416,7 +416,7 @@ void SearchReplaceEngine::ReplaceNext(bool DoReplace) {
cur->UpdateData(); cur->UpdateData();
// Commit // Commit
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("replace"));
} }
else { else {
@ -507,7 +507,7 @@ void SearchReplaceEngine::ReplaceAll() {
// Commit // Commit
if (count > 0) { if (count > 0) {
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("replace"));
grid->CommitChanges(); grid->CommitChanges();
wxMessageBox(wxString::Format(_("%i matches were replaced."),count)); wxMessageBox(wxString::Format(_("%i matches were replaced."),count));
} }

View file

@ -292,7 +292,7 @@ void DialogShiftTimes::OnOK(wxCommandEvent &event) {
Options.Save(); Options.Save();
// End dialog // End dialog
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("shifting"));
grid->CommitChanges(); grid->CommitChanges();
grid->UpdateMaps(); grid->UpdateMaps();
grid->editBox->Update(); grid->editBox->Update();

View file

@ -449,7 +449,7 @@ void DialogStyleEditor::Apply (bool apply,bool close) {
// Copy // Copy
*style = *work; *style = *work;
style->UpdateData(); style->UpdateData();
AssFile::top->FlagAsModified(); AssFile::top->FlagAsModified(_("style change"));
grid->CommitChanges(); grid->CommitChanges();
// Exit // Exit

View file

@ -558,7 +558,7 @@ void DialogStyleManager::OnCopyToCurrent (wxCommandEvent &event) {
else return; else return;
} }
LoadCurrentStyles(AssFile::top); LoadCurrentStyles(AssFile::top);
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("style copy"));
grid->CommitChanges(); grid->CommitChanges();
UpdateMoveButtons(); UpdateMoveButtons();
} }
@ -607,7 +607,7 @@ void DialogStyleManager::OnCurrentCopy (wxCommandEvent &event) {
} }
else delete temp; else delete temp;
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("style copy"));
grid->CommitChanges(); grid->CommitChanges();
UpdateMoveButtons(); UpdateMoveButtons();
} }
@ -711,7 +711,7 @@ void DialogStyleManager::OnCurrentDelete (wxCommandEvent &event) {
CurrentCopy->Enable(false); CurrentCopy->Enable(false);
CurrentDelete->Enable(false); CurrentDelete->Enable(false);
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("style delete"));
grid->CommitChanges(); grid->CommitChanges();
} }
UpdateMoveButtons(); UpdateMoveButtons();
@ -768,7 +768,7 @@ void DialogStyleManager::OnCurrentImport(wxCommandEvent &event) {
// Update // Update
if (modified) { if (modified) {
LoadCurrentStyles(grid->ass); LoadCurrentStyles(grid->ass);
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("style import"));
grid->CommitChanges(); grid->CommitChanges();
} }
} }
@ -978,7 +978,7 @@ void DialogStyleManager::MoveStyles(bool storage, int type) {
} }
// Flag as modified // Flag as modified
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("style move"));
grid->CommitChanges(); grid->CommitChanges();
} }

View file

@ -147,7 +147,7 @@ wxDialog (parent, -1, _("Styling assistant"), wxDefaultPosition, wxDefaultSize,
DialogStyling::~DialogStyling () { DialogStyling::~DialogStyling () {
GetPosition(&lastx, &lasty); GetPosition(&lastx, &lasty);
if (needCommit) { if (needCommit) {
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("style changes"));
grid->CommitChanges(); grid->CommitChanges();
} }
} }
@ -198,7 +198,7 @@ void DialogStyling::SetStyle (wxString curName, bool jump) {
// Update grid/subs // Update grid/subs
grid->Refresh(false); grid->Refresh(false);
if (PreviewCheck->IsChecked()) { if (PreviewCheck->IsChecked()) {
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("styling assistant"));
grid->CommitChanges(); grid->CommitChanges();
} }
else needCommit = true; else needCommit = true;

View file

@ -564,6 +564,6 @@ void DialogTimingProcessor::Process() {
} }
// Update grid // Update grid
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("timing processor"));
grid->CommitChanges(); grid->CommitChanges();
} }

View file

@ -314,7 +314,7 @@ void DialogTranslation::OnTransBoxKey(wxKeyEvent &event) {
cur->UpdateText(); cur->UpdateText();
cur->UpdateData(); cur->UpdateData();
cur->ClearBlocks(); cur->ClearBlocks();
subs->FlagAsModified(); subs->FlagAsModified(_("translation assistant"));
grid->CommitChanges(); grid->CommitChanges();
((FrameMain*)main)->UpdateTitle(); ((FrameMain*)main)->UpdateTitle();
UpdatePreview(); UpdatePreview();

View file

@ -1348,3 +1348,12 @@ bool FrameMain::LoadList(wxArrayString list) {
// Result // Result
return ((subs != _T("")) || (audio != _T("")) || (video != _T(""))); return ((subs != _T("")) || (audio != _T("")) || (video != _T("")));
} }
//////////////////////
// Sets the descriptions for undo/redo
void FrameMain::SetUndoRedoDesc() {
editMenu->SetHelpString(0,_T("Undo ")+AssFile::GetUndoDescription());
editMenu->SetHelpString(1,_T("Redo ")+AssFile::GetRedoDescription());
}

View file

@ -263,6 +263,8 @@ public:
void InitMenu(); void InitMenu();
void UpdateToolbar(); void UpdateToolbar();
void SetDisplayMode(int showVid,int showAudio); void SetDisplayMode(int showVid,int showAudio);
void SetUndoRedoDesc();
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };

View file

@ -453,9 +453,12 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
// Edit menu // Edit menu
else if (curMenu == editMenu) { else if (curMenu == editMenu) {
// Undo state // Undo state
curMenu->FindItemByPosition(0)->SetText(_("Undo ")+AssFile::GetUndoDescription()+_T("\t")+Hotkeys.GetText(_T("Undo")));
curMenu->FindItemByPosition(1)->SetText(_("Redo ")+AssFile::GetRedoDescription()+_T("\t")+Hotkeys.GetText(_T("Redo")));
RebuildMenuItem(editMenu,Menu_Edit_Undo,wxBITMAP(undo_button),wxBITMAP(undo_disable_button),!AssFile::IsUndoStackEmpty()); RebuildMenuItem(editMenu,Menu_Edit_Undo,wxBITMAP(undo_button),wxBITMAP(undo_disable_button),!AssFile::IsUndoStackEmpty());
RebuildMenuItem(editMenu,Menu_Edit_Redo,wxBITMAP(redo_button),wxBITMAP(redo_disable_button),!AssFile::IsRedoStackEmpty()); RebuildMenuItem(editMenu,Menu_Edit_Redo,wxBITMAP(redo_button),wxBITMAP(redo_disable_button),!AssFile::IsRedoStackEmpty());
// Copy/cut/paste // Copy/cut/paste
wxArrayInt sels = SubsBox->GetSelection(); wxArrayInt sels = SubsBox->GetSelection();
bool state = (sels.Count() > 0); bool state = (sels.Count() > 0);
@ -1103,7 +1106,7 @@ void FrameMain::OnSnapToScene (wxCommandEvent &event) {
} }
// Commit // Commit
SubsBox->ass->FlagAsModified(); SubsBox->ass->FlagAsModified(_("snap to scene"));
SubsBox->CommitChanges(); SubsBox->CommitChanges();
} }
} }
@ -1134,7 +1137,7 @@ void FrameMain::OnShiftToFrame (wxCommandEvent &event) {
} }
// Commit // Commit
SubsBox->ass->FlagAsModified(); SubsBox->ass->FlagAsModified(_("shift to frame"));
SubsBox->CommitChanges(); SubsBox->CommitChanges();
} }
} }
@ -1366,7 +1369,7 @@ void FrameMain::OnSort (wxCommandEvent &event) {
// Sort // Sort
AssFile::top->Line.sort(LessByPointedToValue<AssEntry>()); AssFile::top->Line.sort(LessByPointedToValue<AssEntry>());
AssFile::top->FlagAsModified(); AssFile::top->FlagAsModified(_("sort"));
SubsBox->UpdateMaps(); SubsBox->UpdateMaps();
SubsBox->CommitChanges(); SubsBox->CommitChanges();
} }
@ -1521,7 +1524,7 @@ void FrameMain::OnEditBoxCommit(wxCommandEvent &event) {
// Is the text edit // Is the text edit
if (focus == EditBox->TextEdit) { if (focus == EditBox->TextEdit) {
EditBox->CommitText(); EditBox->CommitText();
SubsBox->ass->FlagAsModified(); SubsBox->ass->FlagAsModified(_("editing"));
SubsBox->CommitChanges(); SubsBox->CommitChanges();
} }

View file

@ -551,7 +551,7 @@ void SubsEditBox::OnStyleChange(wxCommandEvent &event) {
cur->UpdateData(); cur->UpdateData();
} }
} }
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("style change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -582,7 +582,7 @@ void SubsEditBox::OnActorChange(wxCommandEvent &event) {
} }
// Update grid // Update grid
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("actor change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -615,7 +615,7 @@ void SubsEditBox::OnLayerChange(wxCommandEvent &event) {
// Done // Done
Layer->SetValue(wxString::Format(_("%i"),temp)); Layer->SetValue(wxString::Format(_("%i"),temp));
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("layer change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -684,7 +684,7 @@ void SubsEditBox::CommitTimes(bool start,bool end,bool fromStart) {
} }
// Commit // Commit
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("commit times"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
audio->SetDialogue(grid,grid->GetDialogue(sel[0]),sel[0]); audio->SetDialogue(grid,grid->GetDialogue(sel[0]),sel[0]);
@ -708,7 +708,7 @@ void SubsEditBox::OnMarginLChange(wxCommandEvent &event) {
} }
} }
MarginL->SetValue(cur->GetMarginString(0,false)); MarginL->SetValue(cur->GetMarginString(0,false));
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("MarginL change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -730,7 +730,7 @@ void SubsEditBox::OnMarginRChange(wxCommandEvent &event) {
} }
} }
MarginR->SetValue(cur->GetMarginString(1,false)); MarginR->SetValue(cur->GetMarginString(1,false));
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("MarginR change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -752,7 +752,7 @@ void SubsEditBox::OnMarginVChange(wxCommandEvent &event) {
} }
} }
MarginV->SetValue(cur->GetMarginString(2,false)); MarginV->SetValue(cur->GetMarginString(2,false));
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("MarginV change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -773,7 +773,7 @@ void SubsEditBox::OnEffectChange(wxCommandEvent &event) {
cur->UpdateData(); cur->UpdateData();
} }
} }
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("effect change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -793,7 +793,7 @@ void SubsEditBox::OnCommentChange(wxCommandEvent &event) {
cur->UpdateData(); cur->UpdateData();
} }
} }
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("comment change"));
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
} }
@ -847,7 +847,7 @@ void SubsEditBox::DoKeyPress(wxKeyEvent &event) {
// Update file // Update file
if (!updated) { if (!updated) {
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("editing"));
grid->CommitChanges(); grid->CommitChanges();
} }
return; return;

View file

@ -393,7 +393,7 @@ void SubtitlesGrid::OnSplitByKaraoke (wxCommandEvent &event) {
for (int i = sels.size()-1; i >= 0; i--) { for (int i = sels.size()-1; i >= 0; i--) {
SplitLineByKaraoke(sels[i]); SplitLineByKaraoke(sels[i]);
} }
ass->FlagAsModified(); ass->FlagAsModified(_("splitting"));
CommitChanges(); CommitChanges();
EndBatch(); EndBatch();
} }
@ -627,7 +627,7 @@ void SubtitlesGrid::OnRecombine(wxCommandEvent &event) {
// Commit // Commit
n1->UpdateData(); n1->UpdateData();
n2->UpdateData(); n2->UpdateData();
ass->FlagAsModified(); ass->FlagAsModified(_("combining"));
CommitChanges(); CommitChanges();
} }
@ -761,8 +761,8 @@ void SubtitlesGrid::LoadFromAss (AssFile *_ass,bool keepSelection,bool dontModif
// Commit // Commit
if (!AssFile::Popping) { if (!AssFile::Popping) {
if (dontModify) AssFile::StackPush(); if (dontModify) AssFile::StackPush(_("load"));
else ass->FlagAsModified(); else ass->FlagAsModified(_("load"));
} }
CommitChanges(); CommitChanges();
@ -803,7 +803,7 @@ void SubtitlesGrid::SwapLines(int n1,int n2) {
diagPtrMap[n1] = (AssDialogue*) *src1; diagPtrMap[n1] = (AssDialogue*) *src1;
diagMap[n2] = src2; diagMap[n2] = src2;
diagPtrMap[n2] = (AssDialogue*) *src2; diagPtrMap[n2] = (AssDialogue*) *src2;
ass->FlagAsModified(); ass->FlagAsModified(_("swap lines"));
CommitChanges(); CommitChanges();
} }
@ -829,7 +829,7 @@ void SubtitlesGrid::InsertLine(AssDialogue *line,int n,bool after,bool update) {
// Update // Update
if (update) { if (update) {
ass->FlagAsModified(); ass->FlagAsModified(_("line insertion"));
CommitChanges(); CommitChanges();
} }
} }
@ -950,7 +950,7 @@ void SubtitlesGrid::PasteLines(int n,bool pasteOver) {
// Commit // Commit
UpdateMaps(); UpdateMaps();
AdjustScrollbar(); AdjustScrollbar();
ass->FlagAsModified(); ass->FlagAsModified(_("paste"));
CommitChanges(); CommitChanges();
// Set selection // Set selection
@ -992,7 +992,7 @@ void SubtitlesGrid::DeleteLines(wxArrayInt target) {
// Update // Update
UpdateMaps(); UpdateMaps();
AdjustScrollbar(); AdjustScrollbar();
ass->FlagAsModified(); ass->FlagAsModified(_("delete"));
CommitChanges(); CommitChanges();
// Update editbox // Update editbox
@ -1071,7 +1071,7 @@ void SubtitlesGrid::AdjoinLines(int n1,int n2,bool setStart) {
} }
// Commit // Commit
AssFile::top->FlagAsModified(); AssFile::top->FlagAsModified(_("adjoin"));
CommitChanges(); CommitChanges();
} }
@ -1232,7 +1232,7 @@ void SubtitlesGrid::SplitLine(int n,int pos,int mode) {
editBox->SetToLine(n); editBox->SetToLine(n);
// Commit // Commit
ass->FlagAsModified(); ass->FlagAsModified(_("split"));
CommitChanges(); CommitChanges();
} }
@ -1393,7 +1393,7 @@ void SubtitlesGrid::SetSubsToVideo(bool start) {
// Commit // Commit
if (modified) { if (modified) {
ass->FlagAsModified(); ass->FlagAsModified(_("timing"));
CommitChanges(); CommitChanges();
editBox->Update(); editBox->Update();
} }

View file

@ -1057,7 +1057,7 @@ void VideoDisplayVisual::OnMouseEvent (wxMouseEvent &event) {
// Commit // Commit
grid->editBox->CommitText(); grid->editBox->CommitText();
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("visual typesetting"));
grid->CommitChanges(false,true); grid->CommitChanges(false,true);
// Set flags // Set flags
@ -1075,7 +1075,7 @@ void VideoDisplayVisual::OnMouseEvent (wxMouseEvent &event) {
if (mode == 0 && event.LeftDClick()) { if (mode == 0 && event.LeftDClick()) {
grid->editBox->SetOverride(_T("\\pos"),wxString::Format(_T("(%i,%i)"),vx,vy),0,false); grid->editBox->SetOverride(_T("\\pos"),wxString::Format(_T("(%i,%i)"),vx,vy),0,false);
grid->editBox->CommitText(); grid->editBox->CommitText();
grid->ass->FlagAsModified(); grid->ass->FlagAsModified(_("positioning"));
grid->CommitChanges(false,true); grid->CommitChanges(false,true);
parent->SetFocus(); parent->SetFocus();
} }