sudipshil9862 / fonts-compare

fonts rendering and comparing
GNU General Public License v2.0
5 stars 2 forks source link

Text in the entry suddenly changes to sample text for the detected language when typing into the entry #6

Closed mike-fabian closed 1 year ago

mike-fabian commented 1 year ago

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

sudipshil9862 commented 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)

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

sudipshil9862 commented 1 year ago

Definitely we can see some solution like deactivating a signal for sometime.

mike-fabian commented 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)

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