diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 0989b788967d..6e60afa1c24e 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -1095,15 +1095,15 @@ bool SwGrfNode::IsSelected() const { const SwNode* pN = this; const SwViewShell* pV = pESh; - do { - if( pV->ISA( SwEditShell ) && pN == &static_cast<const SwCrsrShell*>(pV) + for(const SwViewShell& rCurrentShell : pESh->GetRingContainer()) + { + if( rCurrentShell.ISA( SwEditShell ) && pN == &static_cast<const SwCrsrShell*>(&rCurrentShell) ->GetCrsr()->GetPoint()->nNode.GetNode() ) { bRet = true; break; } } - while( pESh != ( pV = static_cast<SwViewShell*>(pV->GetNext()) )); } return bRet; } |