summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-17 20:43:22 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-18 23:00:57 +0200
commit34d32740d89876c3d4fd2743a07d6e2578601683 (patch)
tree37f8e3ed3a427df67493a7bc5123cc4eace68d13
parenta35311beef378c15ecbb3bb0560035c17f4657ca (diff)
on invalidating other views, specific what Tab is invalidated
the other views might be viewing other tabs and it is only the tab ('part') this view is on which is invalidated Change-Id: I9f054ffa6158a6bc62e3eb7b7170450e26870b54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155816 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--sc/source/ui/inc/gridwin.hxx3
-rw-r--r--sc/source/ui/view/tabview3.cxx7
2 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 979767c6801b..deb3264c7759 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -320,8 +320,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::DocWindow, public DropTarget
void SetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab);
DECL_DLLPRIVATE_LINK(InitiatePageBreaksTimer, Timer*, void);
- void LogicInvalidatePart(const tools::Rectangle* pRectangle, int nPart);
-
protected:
virtual void PrePaint(vcl::RenderContext& rRenderContext) override;
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
@@ -380,6 +378,7 @@ public:
/// @see Window::LogicInvalidate().
void LogicInvalidate(const tools::Rectangle* pRectangle) override;
+ void LogicInvalidatePart(const tools::Rectangle* pRectangle, int nPart);
/// Update the cell selection according to what handles have been dragged.
/// @see vcl::ITiledRenderable::setTextSelection() for the values of nType.
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 38c8fcca449e..9a321f73eefe 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2200,6 +2200,7 @@ void ScTabView::KillEditView( bool bNoPaint )
SCROW nRow1 = aViewData.GetEditStartRow();
SCCOL nCol2 = aViewData.GetEditEndCol();
SCROW nRow2 = aViewData.GetEditEndRow();
+ SCTAB nTab = aViewData.GetTabNo();
bool bPaint[4];
bool bNotifyAcc = false;
tools::Rectangle aRectangle[4];
@@ -2237,16 +2238,16 @@ void ScTabView::KillEditView( bool bNoPaint )
if (comphelper::LibreOfficeKit::isActive())
{
const tools::Rectangle& rInvRect = aRectangle[i];
- pGridWin[i]->LogicInvalidate(&rInvRect);
+ pGridWin[i]->LogicInvalidatePart(&rInvRect, nTab);
// invalidate other views
auto lInvalidateWindows =
- [&rInvRect] (ScTabView* pTabView)
+ [nTab, &rInvRect] (ScTabView* pTabView)
{
for (VclPtr<ScGridWindow> const & pWin: pTabView->pGridWin)
{
if (pWin)
- pWin->LogicInvalidate(&rInvRect);
+ pWin->LogicInvalidatePart(&rInvRect, nTab);
}
};