Skip to content
Snippets Groups Projects
Commit 89efe927 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix a bug in InfoBoxOutput class

If the text was more lines that the height of the active region in the dialog
the 2 last lines were not displayed.
parent 4f08cd0b
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,9 @@ class InfoBoxOutput(Output):
self.msg += "%s%s" % (msg, nl)
# If output is long, only output the last lines that fit in the box
lines = self.msg.splitlines()
h = self.height
# The height of the active region is 2 lines shorter that the height of
# the dialog
h = self.height - 2
display = self.msg if len(lines) <= h else "\n".join(lines[-h:])
self.d.infobox(display, title=self.title, height=self.height,
width=self.width)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment