diff --git a/lib/layout/edtele.cpp b/lib/layout/edtele.cpp index 91e9948db486..cb80b67ba9ea 100644 --- a/lib/layout/edtele.cpp +++ b/lib/layout/edtele.cpp @@ -7026,11 +7026,11 @@ void CEditContainerElement::PrintEnd( CPrintState *pPrintState ){ pPrintState->m_pOut->Printf( space ); pPrintState->m_iCharPos += XP_STRLEN(space); } - if( (GetAlignment() == ED_ALIGN_RIGHT && !IsEmpty() )&& (!pNextContainer || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) { + if( (GetAlignment() == ED_ALIGN_RIGHT && !IsEmpty() )&& (!pNextContainer || pNextContainer->GetType() != P_NSDT || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) { pPrintState->m_pOut->Printf( ""); bNeedReturn = TRUE; } - else if(( GetAlignment() == ED_ALIGN_ABSCENTER && !IsEmpty() ) && (!pNextContainer || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) { + else if(( GetAlignment() == ED_ALIGN_ABSCENTER && !IsEmpty() ) && (!pNextContainer || pNextContainer->GetType() != P_NSDT || !CompareAlignments(pNextContainer->GetAlignment(),GetAlignment())) ) { pPrintState->m_pOut->Printf( ""); bNeedReturn = TRUE; }