mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 00:46:39 +01:00
Fixes #290 issue "Redraw issue when setting coordinates of label"
This commit is contained in:
@@ -430,7 +430,7 @@ namespace Terminal.Gui {
|
||||
SetNeedsDisplay (Bounds);
|
||||
}
|
||||
|
||||
bool layoutNeeded = true;
|
||||
internal bool layoutNeeded = true;
|
||||
|
||||
internal void SetNeedsLayout ()
|
||||
{
|
||||
@@ -2054,11 +2054,28 @@ namespace Terminal.Gui {
|
||||
DrawBounds (state.Toplevel);
|
||||
state.Toplevel.PositionCursor ();
|
||||
Driver.Refresh ();
|
||||
} else if (CheckLayoutNeeded (state.Toplevel)) {
|
||||
TerminalResized ();
|
||||
layoutNeeded = false;
|
||||
} else
|
||||
Driver.UpdateCursor ();
|
||||
}
|
||||
}
|
||||
|
||||
static bool layoutNeeded;
|
||||
static bool CheckLayoutNeeded (View view)
|
||||
{
|
||||
if (view.layoutNeeded)
|
||||
return layoutNeeded = view.layoutNeeded;
|
||||
|
||||
for (int i = 0; view.Subviews.Count > i; i++) {
|
||||
CheckLayoutNeeded (view.Subviews [i]);
|
||||
if (layoutNeeded)
|
||||
return layoutNeeded;
|
||||
}
|
||||
return layoutNeeded;
|
||||
}
|
||||
|
||||
internal static bool DebugDrawBounds;
|
||||
|
||||
// Need to look into why this does not work properly.
|
||||
|
||||
Reference in New Issue
Block a user