Skip to content

Commit 807f1fd

Browse files
BDisptig
andauthored
Fixes #4204. v2win and v2net aren't refreshing the Character Map correctly (#4205)
* Fixes #4204. v2win and v2net aren't refreshing the Character Map correctly * Reformat to run CI again * Revert "Reformat to run CI again" This reverts commit 3efad83. * Revert "Fixes #4204. v2win and v2net aren't refreshing the Character Map correctly" This reverts commit 6ec4adc. * Apply @tig suggested changes * Fixes #4208. MainLoopSyncContext doesn't work with the v2 drivers * Trying fix unit test error * Revert "Trying fix unit test error" This reverts commit 3aaefd6. --------- Co-authored-by: Tig <[email protected]>
1 parent 2025a81 commit 807f1fd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Terminal.Gui/ViewBase/View.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,13 @@ public virtual void EndInit ()
245245
}
246246
}
247247

248-
if (ApplicationImpl.Instance.IsLegacy)
249-
{
250-
// TODO: Figure out how to move this out of here and just depend on LayoutNeeded in Mainloop
251-
Layout (); // the EventLog in AllViewsTester fails to layout correctly if this is not here (convoluted Dim.Fill(Func)).
252-
}
248+
// Force a layout each time a View is initialized
249+
// See: https://github.com/gui-cs/Terminal.Gui/issues/3951
250+
// See: https://github.com/gui-cs/Terminal.Gui/issues/4204
251+
Layout (); // the EventLog in AllViewsTester fails to layout correctly if this is not here (convoluted Dim.Fill(Func)).
253252

253+
// Complex layout scenarios (e.g. DimAuto and PosAlign) may require multiple layouts to be performed.
254+
// Thus, we call SetNeedsLayout() to ensure that the layout is performed at least once.
254255
SetNeedsLayout ();
255256

256257
Initialized?.Invoke (this, EventArgs.Empty);

0 commit comments

Comments
 (0)