diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-28 21:11:53 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-08-30 11:35:01 +0200 |
commit | 1fb18e4472161727115ac2dc0cf6e0d4818e6cb4 (patch) | |
tree | c11e464ea523a898c1cd2208501a3fcc9db49a12 /sc | |
parent | 97b15184947a2b81c2b21a0ae7fd20124c5fca57 (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>
(cherry picked from commit 7ba2c87354d97448fc2b6f5ca0eea6ce0eeefb8a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172568
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
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 8b075bf45cbc..9febf7236518 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2296,9 +2296,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 @@ -2315,10 +2316,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); + } } } } |