diff --git a/LunaTranslator/LunaTranslator/gui/translatorUI.py b/LunaTranslator/LunaTranslator/gui/translatorUI.py index 733e7960..d57512ee 100644 --- a/LunaTranslator/LunaTranslator/gui/translatorUI.py +++ b/LunaTranslator/LunaTranslator/gui/translatorUI.py @@ -165,10 +165,11 @@ class QUnFrameWindow(resizableframeless): self.translate_text.append(' ',hira,origin) self.saveiterclasspointer[iter_context_class]={'curr':self.translate_text.getcurrpointer()+len(text),'start':self.translate_text.getcurrpointer()} else: + self.document.blockSignals(True) self.translate_text.deletebetween(self.saveiterclasspointer[iter_context_class]['start'],self.saveiterclasspointer[iter_context_class]['curr']) self.translate_text.insertatpointer(self.saveiterclasspointer[iter_context_class]['start'],text) self.saveiterclasspointer[iter_context_class]['curr']=self.translate_text.getcurrpointer() - + self.document.blockSignals(False) if globalconfig['zitiyangshi'] ==3: self.translate_text.showyinyingtext2(color,iter_context_class,self.saveiterclasspointer[iter_context_class]['start'],text) return