Browse Source

Fehler behoben

Kolja Strohm 5 years ago
parent
commit
67b942beb4
1 changed files with 8 additions and 0 deletions
  1. 8 0
      TextFeld.cpp

+ 8 - 0
TextFeld.cpp

@@ -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 );