From 1bd5869ac61a159259c68989d53d85f0b51272fb Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Fri, 27 Jul 2007 05:58:55 +0000 Subject: [PATCH] Fixed #480 Originally committed to SVN as r1443. --- aegisub/dialog_style_manager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/aegisub/dialog_style_manager.cpp b/aegisub/dialog_style_manager.cpp index a1794ef5a..aedbb4729 100644 --- a/aegisub/dialog_style_manager.cpp +++ b/aegisub/dialog_style_manager.cpp @@ -859,8 +859,13 @@ void DialogStyleManager::OnCurrentImport(wxCommandEvent &event) { // Check if there is already a style with that name int test = CurrentList->FindString(styles[selections[i]]); if (test != wxNOT_FOUND) { - int answer = wxMessageBox(wxString::Format(_T("There is already a style with the name \"%s\" on the current script. Proceed anyway?"),styles[selections[i]].c_str()),_T("Style name collision."),wxYES_NO); - if (answer != wxYES) continue; + int answer = wxMessageBox(wxString::Format(_T("There is already a style with the name \"%s\" on the current script. Overwrite?"),styles[selections[i]].c_str()),_T("Style name collision."),wxYES_NO); + if (answer == wxYES) { + // Overwrite + modified = true; + *(AssFile::top->GetStyle(styles[selections[i]])) = *temp.GetStyle(styles[selections[i]]); + } + continue; } // Copy