Don't block editing storage styles with the same name as a style on the current script

Originally committed to SVN as r6466.
This commit is contained in:
Thomas Goyne 2012-02-12 04:16:14 +00:00
parent 952bc02c07
commit 437cd47cd3
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ void DialogStyleEditor::Apply(bool apply, bool close) {
// Check if style name is unique // Check if style name is unique
for (unsigned int i=0;i<styles.Count();i++) { for (unsigned int i=0;i<styles.Count();i++) {
if (newStyleName.CmpNoCase(styles[i]) == 0) { if (newStyleName.CmpNoCase(styles[i]) == 0) {
if ((store && store->GetStyle(styles[i]) != style) || c->ass->GetStyle(styles[i]) != style) { if ((store && store->GetStyle(styles[i]) != style) || (!store && c->ass->GetStyle(styles[i]) != style)) {
wxMessageBox("There is already a style with this name. Please choose another name.", "Style name conflict.", wxICON_ERROR|wxOK); wxMessageBox("There is already a style with this name. Please choose another name.", "Style name conflict.", wxICON_ERROR|wxOK);
return; return;
} }