From 34feb59e8c654573788b1fdcb7f11ed8011c63c3 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sun, 29 Dec 2019 08:57:33 -0500 Subject: [PATCH] dont put conosle on extra window --- extensions/extrawindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/extrawindow.cpp b/extensions/extrawindow.cpp index b8d0749..48faaf1 100644 --- a/extensions/extrawindow.cpp +++ b/extensions/extrawindow.cpp @@ -175,7 +175,7 @@ public: QMetaObject::invokeMethod(this, [this] { show(); - QMetaObject::invokeMethod(this, [this] { AddSentence(EXTRA_WINDOW_INFO); }, Qt::QueuedConnection); + AddSentence(EXTRA_WINDOW_INFO); }, Qt::QueuedConnection); } @@ -361,6 +361,7 @@ private: bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo) { - if (sentenceInfo["current select"]) QMetaObject::invokeMethod(&extraWindow, [sentence = S(sentence)] { extraWindow.AddSentence(sentence); }); + if (sentenceInfo["current select"] && sentenceInfo["text number"] != 0) + QMetaObject::invokeMethod(&extraWindow, [sentence = S(sentence)] { extraWindow.AddSentence(sentence); }); return false; }