primitivus: paste is now treated as normal text instead of discarded if edit_bar doesn't exist

This commit is contained in:
Goffi 2016-06-28 18:32:57 +02:00
commit dc69b62b16

View file

@ -417,7 +417,10 @@ class PrimitivusApp(QuickApp, InputHistory):
try:
edit_bar = self.editBar
except AttributeError:
log.warning(u"Paste discarded: there is no edit bar yet")
log.warning(u"Paste treated as normal text: there is no edit bar yet")
if extra is None:
extra = []
extra.extend(input_)
else:
if self.main_widget.focus == edit_bar:
# XXX: if a paste is detected, we append it directly to the edit bar text