Fixed styling manager, editor, and kanji timer.

Originally committed to SVN as r898.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-26 23:42:19 +00:00
parent 7a209feb22
commit 9a292d6091
3 changed files with 4 additions and 4 deletions

View file

@ -67,7 +67,7 @@ private:
wxString TextBeforeKaraoke; wxString TextBeforeKaraoke;
wxString *RegroupSourceText, *RegroupGroups; wxString *RegroupSourceText, *RegroupGroups;
std::vector<std::pair<int,wxString>> LinesToChange; std::vector<std::pair<int,wxString> > LinesToChange;
int *RegroupSourceKLengths; int *RegroupSourceKLengths;
int RegroupSourceSelected, RegroupTotalLen; int RegroupSourceSelected, RegroupTotalLen;
int SourceIndex, DestIndex; int SourceIndex, DestIndex;

View file

@ -367,7 +367,7 @@ void DialogStyleEditor::Apply (bool apply,bool close) {
} }
// Style name change // Style name change
if (work->name != newStyleName) { if (work->name != newStyleName && !work->name.StartsWith(_("Copy of "))) {
// See if user wants to update style name through script // See if user wants to update style name through script
int answer = wxNO; int answer = wxNO;
if (work->name != _T("Default")) answer = wxMessageBox(_T("Do you want to change all instances of this style in the script to this new name?"),_T("Update script?"),wxYES_NO | wxCANCEL); if (work->name != _T("Default")) answer = wxMessageBox(_T("Do you want to change all instances of this style in the script to this new name?"),_T("Update script?"),wxYES_NO | wxCANCEL);

View file

@ -568,6 +568,7 @@ void DialogStyleManager::OnCopyToCurrent (wxCommandEvent &event) {
// Storage make copy // Storage make copy
void DialogStyleManager::OnStorageCopy (wxCommandEvent &event) { void DialogStyleManager::OnStorageCopy (wxCommandEvent &event) {
wxArrayInt selections; wxArrayInt selections;
StorageList->GetSelections(selections);
AssStyle *temp = new AssStyle; AssStyle *temp = new AssStyle;
*temp = *(styleStorageMap.at(selections[0])); *temp = *(styleStorageMap.at(selections[0]));
@ -592,6 +593,7 @@ void DialogStyleManager::OnStorageCopy (wxCommandEvent &event) {
// Current make copy // Current make copy
void DialogStyleManager::OnCurrentCopy (wxCommandEvent &event) { void DialogStyleManager::OnCurrentCopy (wxCommandEvent &event) {
wxArrayInt selections; wxArrayInt selections;
CurrentList->GetSelections(selections);
AssStyle *temp = new AssStyle(styleMap.at(selections[0])->GetEntryData()); AssStyle *temp = new AssStyle(styleMap.at(selections[0])->GetEntryData());
wxString newName = _("Copy of "); wxString newName = _("Copy of ");
@ -616,7 +618,6 @@ void DialogStyleManager::OnCurrentCopy (wxCommandEvent &event) {
/////////////// ///////////////
// Storage new // Storage new
void DialogStyleManager::OnStorageNew (wxCommandEvent &event) { void DialogStyleManager::OnStorageNew (wxCommandEvent &event) {
wxArrayInt selections;
AssStyle *temp = new AssStyle; AssStyle *temp = new AssStyle;
DialogStyleEditor editor(this,temp,grid); DialogStyleEditor editor(this,temp,grid);
@ -634,7 +635,6 @@ void DialogStyleManager::OnStorageNew (wxCommandEvent &event) {
/////////////// ///////////////
// Current new // Current new
void DialogStyleManager::OnCurrentNew (wxCommandEvent &event) { void DialogStyleManager::OnCurrentNew (wxCommandEvent &event) {
wxArrayInt selections;
AssStyle *temp = new AssStyle; AssStyle *temp = new AssStyle;
DialogStyleEditor editor(this,temp,grid); DialogStyleEditor editor(this,temp,grid);