diff --git a/aegisub/src/dialog_style_editor.cpp b/aegisub/src/dialog_style_editor.cpp index 5a3db7954..9527e32ef 100644 --- a/aegisub/src/dialog_style_editor.cpp +++ b/aegisub/src/dialog_style_editor.cpp @@ -436,21 +436,8 @@ void DialogStyleEditor::Apply (bool apply,bool close) { // Check if style name is unique for (unsigned int i=0;iass->GetStyle(styles[i]) != style) ok = false; - } - - // Storage - else { - if (store->GetStyle(styles[i]) != style) ok = false; - } - - // Repeated name - if (!ok) { + if (newStyleName.CmpNoCase(styles[i]) == 0) { + if ((isLocal && grid->ass->GetStyle(styles[i]) != style) || (!isLocal && store->GetStyle(styles[i]) != style)) { wxMessageBox(_T("There is already a style with this name. Please choose another name."),_T("Style name conflict."),wxICON_ERROR); return; }