author | Andrey Skvortsov <andrej.skvortzov@gmail.com> |
Fri, 10 Mar 2017 18:42:24 +0300 | |
changeset 1660 | ccf2bcf66c70 |
parent 1659 | aec0ed4b6f39 |
child 1664 | 9a91faac4d95 |
editors/Viewer.py | file | annotate | diff | comparison | revisions |
--- a/editors/Viewer.py Thu Mar 09 18:03:57 2017 +0300 +++ b/editors/Viewer.py Fri Mar 10 18:42:24 2017 +0300 @@ -3016,7 +3016,9 @@ _("Please enter comment text"), comment.GetContent(), wx.OK|wx.CANCEL|wx.TE_MULTILINE) - dialog.SetClientSize(wx.Size(400, 200)) + width, height = comment.GetSize() + dialogSize = wx.Size(max(width + 30, 400), max(height + 60, 200)) + dialog.SetClientSize(dialogSize) if dialog.ShowModal() == wx.ID_OK: value = dialog.GetValue() rect = comment.GetRedrawRect(1, 1)