diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-28 21:11:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-29 09:03:57 +0200 |
commit | 7ba2c87354d97448fc2b6f5ca0eea6ce0eeefb8a (patch) | |
tree | 9ae48b77e27ebe6519291f044b3212ef5adae8c5 /sc | |
parent | 635514553abdd830951d3ba91651c9f0b208360b (diff) |
Resolves: tdf#162651 area under removed editview needs to be refreshed
which has become a problem since:
commit 6d71c21890c908225945f0fc3566255ed150f660
CommitDate: Mon Jan 22 20:47:16 2024 +0100
don't always invalidate the entire width of the calc window
Change-Id: Ic0db4932091806c79fd9e773d7be35727560a1ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172552
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 40bda51d7b58..dd4495653d5b 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2297,9 +2297,10 @@ void ScTabView::KillEditView( bool bNoPaint ) pGridWin[i]->SetMapMode(pGridWin[i]->GetDrawMapMode()); + const tools::Rectangle& rInvRect = aRectangle[i]; + if (comphelper::LibreOfficeKit::isActive()) { - const tools::Rectangle& rInvRect = aRectangle[i]; pGridWin[i]->LogicInvalidatePart(&rInvRect, nTab); // invalidate other views @@ -2316,10 +2317,26 @@ void ScTabView::KillEditView( bool bNoPaint ) SfxLokHelper::forEachOtherView(GetViewData().GetViewShell(), lInvalidateWindows); } // #i73567# the cell still has to be repainted - else if (bExtended || ( bAtCursor && !bNoPaint )) + else { - pGridWin[i]->Draw( nCol1, nRow1, nCol2, nRow2, ScUpdateMode::All ); - pGridWin[i]->UpdateSelectionOverlay(); + const bool bDoPaint = bExtended || (bAtCursor && !bNoPaint); + const bool bDoInvalidate = !bDoPaint && bAtCursor; + if (bDoPaint) + { + pGridWin[i]->Draw( nCol1, nRow1, nCol2, nRow2, ScUpdateMode::All ); + pGridWin[i]->UpdateSelectionOverlay(); + } + else if (bDoInvalidate) + { + // tdf#162651 even if !bNoPaint is set, and there will be a + // follow up Draw of the next content, the area blanked out + // by the editview which is being removed still needs to be + // invalidated. The follow-up Draw of the content may be + // optimized to only redraw the area of cells where content + // has changed and will be unaware of what bounds this + // editview grew to during its editing cycle. + pGridWin[i]->Invalidate(rInvRect); + } } } } |