This patch fixes the problem by resetting LabelStringAppendix
everytime LabelString is reset. I think this is the right way to
proceed, but there could be unforeseen consequences. 

For the record, the previous algorithm was to set appendix label to
normal label at the end of Style parsing only if appendix label was
empty.

If nobody complains, I'll apply it to trunk and branch.

JMarc

Index: src/lyxlayout.C
===================================================================
--- src/lyxlayout.C	(révision 17628)
+++ src/lyxlayout.C	(copie de travail)
@@ -450,8 +450,10 @@ bool LyXLayout::read(LyXLex & lexrc, LyX
 			break;
 
 		case LT_LABELSTRING:	// label string definition
-			if (lexrc.next())
+			if (lexrc.next()) {
 				labelstring_ = trim(lexrc.getDocString());
+				labelstring_appendix_ = labelstring_;
+			}
 			break;
 
 		case LT_ENDLABELSTRING:	// endlabel string definition
@@ -486,8 +488,6 @@ bool LyXLayout::read(LyXLex & lexrc, LyX
 	}
 	lexrc.popTable();
 
-	if (labelstring_appendix_.empty())
-		labelstring_appendix_ = labelstring_;
 	return error;
 }
 

Reply via email to