Skip to content

Commit

Permalink
utils/messages: Split message text on first new line (if any)
Browse files Browse the repository at this point in the history
Restore old behaviour.
  • Loading branch information
ales-erjavec committed Aug 3, 2017
1 parent f4093a0 commit 3a336f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Orange/widgets/utils/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,15 @@ def update_message_state(self):

def msg(m):
# type: (_BoundMsg) -> MessagesWidget.Message
text = str(m)
extra = ""
if "\n" in text:
text, extra = text.split("\n", 1)

return MessagesWidget.Message(
MessagesWidget.Severity(m.group.severity),
text=str(m), detailedText=m.tb if m.tb else ""
text=text, informativeText=extra,
detailedText=m.tb if m.tb else ""
)

messages = [msg
Expand Down

0 comments on commit 3a336f6

Please sign in to comment.