##// END OF EJS Templates
Merge pull request #2830 from punchagan/fix-format-tooltip...
Bradley M. Froehle -
r9225:21c6d8fe merge
parent child Browse files
Show More
@@ -1,6 +1,5 b''
1 # Standard library imports
1 # Standard library imports
2 import re
2 import re
3 from textwrap import dedent
4 from unicodedata import category
3 from unicodedata import category
5
4
6 # System library imports
5 # System library imports
@@ -254,6 +253,9 b' class CallTipWidget(QtGui.QLabel):'
254 # make sure a long argument list does not make
253 # make sure a long argument list does not make
255 # the first row overflow the width of the actual tip body
254 # the first row overflow the width of the actual tip body
256 rows = doc.split("\n")
255 rows = doc.split("\n")
256 # An object which is not a callable has '<no docstring>' as doc
257 if len(rows) == 1:
258 return doc
257 max_text_width = max(80, max([len(x) for x in rows[1:]]))
259 max_text_width = max(80, max([len(x) for x in rows[1:]]))
258 rows= textwrap.wrap(rows[0],max_text_width) + rows[1:]
260 rows= textwrap.wrap(rows[0],max_text_width) + rows[1:]
259 doc = "\n".join(rows)
261 doc = "\n".join(rows)
General Comments 0
You need to be logged in to leave comments. Login now