Skip to content

Commit

Permalink
improve text composition
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Jul 17, 2021
1 parent 310e87d commit cecd5f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ViewModels/GridViewModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ and GridViewModel(_gridid: int, ?_parent: GridViewModel, ?_gridsize: GridSize) a
m_cursor_vm.row <- row
m_cursor_vm.col <- col
cursorConfig()
elif m_cursor_vm.focused then
elif m_cursor_vm.focused && not(states.ui_multigrid && _gridid = 1) then
m_cursor_vm.focused <- false
m_cursor_vm.RenderTick <- m_cursor_vm.RenderTick + 1

Expand Down
10 changes: 9 additions & 1 deletion Views/Grid.xaml.fs
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,16 @@ type Grid() as this =
draw row r.col r.col_end
)
let mutable drawn = vm.DrawOps.Count <> 0
// for the base grid, do not block drawing of children
// for the base grid, do not block drawing of children, and
// mark child grid dirty if base updates overlapped it
if vm.GridId = grid_vm.GridId then
for cgrid in vm.ChildGrids do
let touched = _drawnRegions
|> Seq.exists(fun(r,c,ce) ->
cgrid.AnchorRow <= r &&
r < cgrid.AnchorRow + cgrid.Rows &&
not( cgrid.AnchorCol >= ce || c >= cgrid.AnchorCol + cgrid.Cols ))
if touched then cgrid.MarkAllDirty()
_drawnRegions.Clear()
for c in vm.ChildGrids do
let child_drawn = drawOps c
Expand Down

0 comments on commit cecd5f9

Please sign in to comment.