|
@@ -165,6 +165,14 @@ void TextFeld::TextStyleManager::cleanupStyles()
|
|
|
TextStyle last = textStyle.get( 0 );
|
|
|
for( int i = 1; i < sc; i++ )
|
|
|
{
|
|
|
+ if( textStyle.get( i ).beginIndex == last.beginIndex )
|
|
|
+ {
|
|
|
+ last = textStyle.get( i );
|
|
|
+ textStyle.remove( i - 1 );
|
|
|
+ i--;
|
|
|
+ sc--;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if( textStyle.get( i ) == last || ( text && textStyle.get( i ).beginIndex > text->getLength() ) )
|
|
|
{
|
|
|
textStyle.remove( i );
|