[Kst] branches/work/kst/portto4/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Mon Jan 19 04:44:03 CET 2009
SVN commit 913304 by netterfield:
Fix some bugs in labels and label parsing:
bold, italics, underline work now
parse errors like \badtag{text} no longer crash.
M +0 -6 devel-docs/Kst2Specs/Bugs
M +7 -0 devel-docs/Kst2Specs/FixedBugs
M +3 -9 src/libkstapp/labelrenderer.cpp
M +1 -4 src/libkstmath/labelparser.cpp
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Bugs #913303:913304
@@ -91,12 +91,6 @@
--------
-In labels, \textbf{text} and \textit{text} set bold and italics for 'text',
-but they don't un-set bold and italics after the end of the curley brackets.
-They should.
-
---------
-
Tied zoom behavior oddness:
Tied zoom has been implemented as a toggle button, setting or unsetting
all of the zoom ties. However, when in tied zoom, it is still possible to un-tie
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/FixedBugs #913303:913304
@@ -294,3 +294,10 @@
Should add some more latex mode fields
\odot
+
+--------
+
+In labels, \textbf{text} and \textit{text} set bold and italics for 'text',
+but they don't un-set bold and italics after the end of the curley brackets.
+They should.
+
--- branches/work/kst/portto4/kst/src/libkstapp/labelrenderer.cpp #913303:913304
@@ -57,15 +57,9 @@
f.setPixelSize(rc.size);
}
- if (fi->attributes.bold) {
- f.setBold(fi->attributes.bold);
- }
- if (fi->attributes.italic) {
- f.setItalic(fi->attributes.italic);
- }
- if (fi->attributes.underline) {
- f.setItalic(fi->attributes.underline);
- }
+ f.setBold(fi->attributes.bold);
+ f.setItalic(fi->attributes.italic);
+ f.setUnderline(fi->attributes.underline);
if (rc.p && fi->attributes.color.isValid()) {
rc.p->setPen(fi->attributes.color);
--- branches/work/kst/portto4/kst/src/libkstmath/labelparser.cpp #913303:913304
@@ -411,7 +411,7 @@
*skip = parseStart - from + 1;
dumpattr(working, "end group for textbf");
return true;
- } else if (txt.mid(from + 1).startsWith("extit")) {
+ } else if (txt.mid(from + 1).startsWith("extit{")) {
if ((*tail)->group) {
*tail = new Chunk(*tail, Chunk::None, false, true);
}
@@ -474,7 +474,6 @@
parseInternal(working, txt, parseStart, txt.length(), interpretNewLine);
*skip = parseStart - from + 1;
dumpattr(working, "end group for underline");
- working->attributes.underline = false;
return true;
} else if (txt.mid(from + 1).startsWith("psilon")) {
*skip = 7;
@@ -573,9 +572,7 @@
} else {
bool rc = false;
if (ctail->vOffset == Chunk::None) {
- dumpattr(ctail->group, "start group with text or group");
rc = 0L != parseInternal(new Chunk(ctail, Chunk::None, true, true), txt, ++i, cnt, interpretNewLine);
- dumpattr(ctail->group, "after start group with text or group");
} else {
rc = 0L != parseInternal(new Chunk(ctail->prev, Chunk::None, true, true), txt, ++i, cnt, interpretNewLine);
}
More information about the Kst
mailing list