diff options
Diffstat (limited to 'sc/source/ui/view/tabview5.cxx')
-rw-r--r-- | sc/source/ui/view/tabview5.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index b8736dd6d6e5..abf8a1e8ccb4 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -677,11 +677,12 @@ void ScTabView::OnLOKNoteStateChanged(const ScPostIt* pNote) aInvalidRect.AdjustTop( -nBorderSize ); aInvalidRect.AdjustBottom( nBorderSize ); + SfxViewShell* pCurrentViewShell = SfxViewShell::Current(); SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while (pViewShell) { ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell); - if (pTabViewShell) + if (pTabViewShell && pViewShell->GetDocId() == pCurrentViewShell->GetDocId()) { for (auto& pWin: pTabViewShell->pGridWin) { |