The patch fixes the drawing of the start appendix line (which was way off) and 
the setOnOff handling in LyXText::getStatus (i.e. the visual feedback of 
startAppendix, Noun and Emphasized).

It lets the LFUNS which use setOnOff return true. Currently they don't return 
themselves, thus setOnOff() is overridden by enabled() at the end of 
getStatus, and the toggle status is not visible in the menus/the toolbar. 

OK to apply?

Jürgen

Index: rowpainter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v
retrieving revision 1.148
diff -u -r1.148 rowpainter.C
--- rowpainter.C	26 Apr 2005 11:12:10 -0000	1.148
+++ rowpainter.C	30 Apr 2005 13:02:52 -0000
@@ -469,7 +469,7 @@
 
 	// start of appendix?
 	if (parparams.startOfAppendix())
-		y_top += paintAppendixStart(yo_ + y_top + 2 * defaultRowHeight());
+		y_top += paintAppendixStart(yo_ - row_.ascent() + 2 * defaultRowHeight());
 
 	Buffer const & buffer = *bv_.buffer();
 
Index: text3.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
retrieving revision 1.292
diff -u -r1.292 text3.C
--- text3.C	26 Apr 2005 11:12:14 -0000	1.292
+++ text3.C	30 Apr 2005 13:02:58 -0000
@@ -1553,7 +1553,7 @@
 
 	case LFUN_APPENDIX:
 		flag.setOnOff(cur.paragraph().params().startOfAppendix());
-		break;
+		return true;
 
 #if 0
 	// the functions which insert insets
@@ -1740,27 +1740,27 @@
 
 	case LFUN_EMPH:
 		flag.setOnOff(font.emph() == LyXFont::ON);
-		break;
+		return true;
 
 	case LFUN_NOUN:
 		flag.setOnOff(font.noun() == LyXFont::ON);
-		break;
+		return true;
 
 	case LFUN_BOLD:
 		flag.setOnOff(font.series() == LyXFont::BOLD_SERIES);
-		break;
+		return true;
 
 	case LFUN_SANS:
 		flag.setOnOff(font.family() == LyXFont::SANS_FAMILY);
-		break;
+		return true;
 
 	case LFUN_ROMAN:
 		flag.setOnOff(font.family() == LyXFont::ROMAN_FAMILY);
-		break;
+		return true;
 
 	case LFUN_CODE:
 		flag.setOnOff(font.family() == LyXFont::TYPEWRITER_FAMILY);
-		break;
+		return true;
 
 	case LFUN_DELETE_WORD_FORWARD:
 	case LFUN_DELETE_WORD_BACKWARD:

Reply via email to