Ticket #1096: [1096]style_manager_copy_style.patch

File [1096]style_manager_copy_style.patch, 1.6 KB (added by Paranoja, 2 years ago)
  • aegisub/src/dialog_style_manager.cpp

     
    566566                for (std::list<AssStyle *>::iterator style = Store.style.begin(); style != Store.style.end(); ++style) { 
    567567                        if ((*style)->name.CmpNoCase(styleName) == 0) { 
    568568                                addStyle = false; 
    569                                 if (wxYES == wxMessageBox(wxString::Format(_T("There is already a style with the name \"%s\" on the current storage. Proceed and overwrite anyway?"),styleName), _T("Style name collision."), wxYES_NO)) { 
     569                                if (wxYES == wxMessageBox(wxString::Format(_T("There is already a style with the name \"%s\" on the current storage. Proceed and overwrite anyway?"),styleName.c_str()), _T("Style name collision."), wxYES_NO)) { 
    570570                                        **style = *styleMap.at(selections[i]); 
    571571                                } 
    572572                                break; 
     
    595595                for (std::vector<AssStyle *>::iterator style = styleMap.begin(); style != styleMap.end(); ++style) { 
    596596                        if ((*style)->name.CmpNoCase(styleName) == 0) { 
    597597                                addStyle = false; 
    598                                 if (wxYES == wxMessageBox(wxString::Format(_T("There is already a style with the name \"%s\" on the current script. Proceed and overwrite anyway?"),styleName), _T("Style name collision."), wxYES_NO)) { 
     598                                if (wxYES == wxMessageBox(wxString::Format(_T("There is already a style with the name \"%s\" on the current script. Proceed and overwrite anyway?"),styleName.c_str()), _T("Style name collision."), wxYES_NO)) { 
    599599                                        **style = *styleStorageMap.at(selections[i]); 
    600600                                } 
    601601                                break;