mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 00:46:39 +01:00
Trying to debug @bdisp's About box issue
This commit is contained in:
@@ -580,11 +580,9 @@ public class TextFormatter
|
||||
public List<string> GetLines ()
|
||||
{
|
||||
string text = _text!;
|
||||
int width = _constrainToWidth.GetValueOrDefault ();
|
||||
int height = _constrainToHeight.GetValueOrDefault ();
|
||||
|
||||
// With this check, we protect against subclasses with overrides of Text
|
||||
if (string.IsNullOrEmpty (Text) || width == 0 || height == 0)
|
||||
if (string.IsNullOrEmpty (Text) || ConstrainToWidth is 0 || ConstrainToHeight is 0)
|
||||
{
|
||||
_lines = [string.Empty];
|
||||
NeedsFormat = false;
|
||||
@@ -597,6 +595,9 @@ public class TextFormatter
|
||||
return _lines;
|
||||
}
|
||||
|
||||
int width = ConstrainToWidth ?? int.MaxValue;
|
||||
int height = ConstrainToHeight ?? int.MaxValue;
|
||||
|
||||
if (FindHotKey (_text!, HotKeySpecifier, out _hotKeyPos, out Key newHotKey))
|
||||
{
|
||||
HotKey = newHotKey;
|
||||
|
||||
Reference in New Issue
Block a user