Closed mike-fabian closed 1 year ago
text1 = text for i, item in enumerate(self.combo.get_model()): if item[0] == lang: self.combo.set_active(i) self.entry.set_text(text1)
we can't avoid calling on_changed as set_active calls it somehow [Don't know maybe] but we can take the previous text throught out the function
Definitely we can see some solution like deactivating a signal for sometime.
text1 = text for i, item in enumerate(self.combo.get_model()): if item[0] == lang: self.combo.set_active(i) self.entry.set_text(text1)
I just change this line and it worked we can't avoid calling on_changed as set_active calls it somehow [Don't know maybe] but we can take the previous text throught out the function
https://github.com/sudipshil9862/fonts-compare/commit/54cf3c3eac5af285e2ca642f6ba28e4cf491b625
That does not fix the problem at all, it makes it worse. With current git master, typing into the entry looks like this:
https://user-images.githubusercontent.com/2330175/196230606-44bf9370-32e9-4645-8d89-fbdf0709ca08.mp4
I delete the “How are you” in the entry and type a “D”, then German is detected and my typed “D” disappears and is replaced by the German sample text “wie gehts”.
https://user-images.githubusercontent.com/2330175/195013264-1e0c2190-ad7a-44c5-b39c-abc258fba83f.mp4