From f18fb3a81b82242a76dafc228e7ee8a0af25d911 Mon Sep 17 00:00:00 2001 From: bjakja Date: Fri, 31 Jan 2020 12:23:14 +0100 Subject: [PATCH] Fixed error info after select "?!" in text field --- Kaiplayer/MKVWrap.cpp | 12 ++++++------ Kaiplayer/MyTextEditor.cpp | 2 +- Kaiplayer/stylestore.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Kaiplayer/MKVWrap.cpp b/Kaiplayer/MKVWrap.cpp index 1b00b9292..34fdbe172 100644 --- a/Kaiplayer/MKVWrap.cpp +++ b/Kaiplayer/MKVWrap.cpp @@ -357,7 +357,7 @@ bool MatroskaWrapper::GetSubtitles(SubsGrid *target) { } //progress->Update(99,"Wstawianie napisów do okna"); - for (unsigned int i=0;iAddLine(new Dialogue(subList[i])); } const wxString &matrix = target->GetSInfo("YCbCr Matrix"); @@ -382,7 +382,7 @@ std::map MatroskaWrapper::GetFontList() { std::map attsname; mkv_GetAttachments(file, &atts, &count); - if(!atts || count==0){return attsname;} + if(!atts || count==0){ return attsname; } for(size_t i=0; ifp, atts[id].Position, SEEK_SET); - fread(tmp,1,atts[id].Length,input->fp); - bool isgood=true; + fread(tmp, 1, atts[id].Length,input->fp); + bool isgood = true; if(zip){ wxString fn = path.AfterLast('\\'); try{ isgood=zip->PutNextEntry(fn); - zip->Write((void*)tmp,atts[id].Length); + zip->Write((void*)tmp, atts[id].Length); } catch(...) { @@ -419,7 +419,7 @@ bool MatroskaWrapper::SaveFont(int id, const wxString &path, wxZipOutputStream * if (file.IsOpened()){ file.Write(tmp, atts[id].Length); file.Close(); - }else{ isgood=false; } + }else{ isgood = false; } } delete[] tmp; diff --git a/Kaiplayer/MyTextEditor.cpp b/Kaiplayer/MyTextEditor.cpp index 36a270df0..7f05d4892 100644 --- a/Kaiplayer/MyTextEditor.cpp +++ b/Kaiplayer/MyTextEditor.cpp @@ -1647,7 +1647,7 @@ bool TextEditor::CheckIfKeyword(const wxString &word) void TextEditor::SeekSelected(const wxString &word) { - if (word.length() < 1 || (word.length() < 2 && !wxIsalnum(word[0]))) + if (word.length() < 1 || (/*word.length() < 2 && */!wxIsalnum(word[0]))) return; diff --git a/Kaiplayer/stylestore.cpp b/Kaiplayer/stylestore.cpp index 4b9a42401..2c6ca8b70 100644 --- a/Kaiplayer/stylestore.cpp +++ b/Kaiplayer/stylestore.cpp @@ -995,7 +995,7 @@ void StyleStore::ShowStore() void StyleStore::ShowStyleEdit(const wxString &styleName /*= ""*/) { StyleStore *SS = Get(); - if (!SS->detachedEtit && SS->IsShown() && !SS->cc->IsShown()){ + if (!SS->detachedEtit && ((SS->IsShown() && !SS->cc->IsShown()) || !SS->IsShown())){ SS->Mainall->Detach(SS->cc); SS->cc->Destroy(); SS->cc = new StyleChange(SS, false);