Bug 127380 - textbf and textit not behaving correctly
Summary: textbf and textit not behaving correctly
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-15 19:52 UTC by Andrew Walker
Modified: 2006-05-15 20:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2006-05-15 19:52:11 UTC
Version:           HEAD (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources
OS:                Linux

STEPS TO REPRODUCE:
Start Kst
Create a label and set the text to be \textbf{\textit{2.0}test}

RESULTS:
"2.0" is in bold italic font
"test" is in normal font

EXPECTED RESULTS:
"2.0" is in bold italic font
"test" is in bold font
Comment 1 George Staikos 2006-05-15 20:37:41 UTC
SVN commit 541207 by staikos:

fix parsing of nested attributes
BUG: 127380


 M  +1 -1      src/libkstmath/labelparser.cpp  
 M  +4 -0      tests/testlabelparser.cpp  


--- trunk/extragear/graphics/kst/src/libkstmath/labelparser.cpp #541206:541207
@@ -106,7 +106,7 @@
   if (*tail && !(*tail)->locked()) {
     (*tail)->text += c;
   } else {
-    Chunk *f = new Chunk(*tail);
+    Chunk *f = new Chunk(*tail, Chunk::None, false, true);
     f->text += c;
     *tail = f;
   }
--- trunk/extragear/graphics/kst/tests/testlabelparser.cpp #541206:541207
@@ -467,6 +467,10 @@
   // FIXME
   delete parsed;
 
+  parsed = Label::parse("\\textbf{\\textit{italicbold}bold}");
+  // FIXME
+  delete parsed;
+
   // more to test...
 }