Skip to content

Commit

Permalink
Fixed error info after select "?!" in text field
Browse files Browse the repository at this point in the history
  • Loading branch information
bjakja committed Jan 31, 2020
1 parent 5dc9266 commit f18fb3a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Kaiplayer/MKVWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ bool MatroskaWrapper::GetSubtitles(SubsGrid *target) {
}

//progress->Update(99,"Wstawianie napisów do okna");
for (unsigned int i=0;i<subList.size();i++) {
for (unsigned int i=0; i<subList.size(); i++) {
target->AddLine(new Dialogue(subList[i]));
}
const wxString &matrix = target->GetSInfo("YCbCr Matrix");
Expand All @@ -382,7 +382,7 @@ std::map<int, wxString> MatroskaWrapper::GetFontList()
{
std::map<int, wxString> attsname;
mkv_GetAttachments(file, &atts, &count);
if(!atts || count==0){return attsname;}
if(!atts || count==0){ return attsname; }

for(size_t i=0; i<count; i++)
{
Expand All @@ -398,14 +398,14 @@ bool MatroskaWrapper::SaveFont(int id, const wxString &path, wxZipOutputStream *

char *tmp = new char[atts[id].Length];
_fseeki64(input->fp, 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(...)
{
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Kaiplayer/MyTextEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down
2 changes: 1 addition & 1 deletion Kaiplayer/stylestore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f18fb3a

Please sign in to comment.