[sword-devel] Current Verse autocolor is not persistent. FIXED?
David Trotz (Integrity Online)
sword-devel@crosswire.org
Mon, 11 Jun 2001 19:43:30 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C0F2AE.CA8D8F00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sorry for the HTML email but I wanted to show something better and plain =
text doesn't cut it. I found where the MarkCurrentVerse is being turned =
back on even when it is off. Is there any reason why this is turned on =
here. I have extracted the following code from the SWDispRTFChap class.
char SWDispRTFChap::Display(SWModule &Module)
{=20
...
if ((key->Verse() =3D=3D verse) && (AutoPosition =3D=3D true)) {
tmptext =3D newtext + RTFTrailer;
RTFStream->Clear();
RTFStream->WriteBuffer(tmptext.c_str(), tmptext.Length());
RTFStream->Position =3D 0;
//FMarkCurrentVerse =3D true; // If I comment this line out the bug =
is fixed
Lines->LoadFromStream(RTFStream);
PlainText =3D true;
versepos =3D GetTextLen(); //RTFStream.Position;
PlainText =3D false;
}
...
}
I am concerned that this was here for a reason I don't know about. I =
cannot see of any reason why we would want to turn this on here so I =
commented it out and now the current verse autocolor works as expected. =
But maybe I have introduced a new bug. Anyone know why this was here? If =
not this fixes the problem. My patch on Sunday will include this change. =
In Christ,
David Trotz
------=_NextPart_000_0007_01C0F2AE.CA8D8F00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><FONT size=3D2>Sorry for the HTML email but I wanted to show =
something better=20
and plain text doesn't cut it. I found where the MarkCurrentVerse is =
being=20
turned back on even when it is off. Is there any reason why this is =
turned on=20
here. I have extracted the following code from the SWDispRTFChap=20
class.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>char SWDispRTFChap::Display(SWModule =
&Module)</FONT></DIV>
<DIV><FONT size=3D2>{ </FONT></DIV>
<DIV><FONT size=3D2>...</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2><EM> if ((key->Verse() =3D=3D verse) =
&&=20
(AutoPosition =3D=3D true)) {<BR> tmptext =3D newtext + =
RTFTrailer;<BR> RTFStream->Clear();<BR> &n=
bsp;RTFStream->WriteBuffer(tmptext.c_str(),=20
tmptext.Length());<BR> RTFStream->Position =3D=20
0;<BR> <FONT =
color=3D#ff0000><STRONG>//FMarkCurrentVerse =3D=20
true; // If I comment this line out the bug is=20
fixed</STRONG></FONT><BR> Lines->LoadFromStream(RTFSt=
ream);<BR> PlainText=20
=3D true;<BR> versepos =3D GetTextLen();=20
//RTFStream.Position;<BR> PlainText =3D=20
false;<BR> }</EM></FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>...</FONT></DIV>
<DIV><FONT size=3D2>}</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>I am concerned that this was here for a reason I =
don't know=20
about. I cannot see of any reason why we would want to turn this on here =
so I=20
commented it out and now the current verse autocolor works as expected. =
But=20
maybe I have introduced a new bug. Anyone know why this was here? If not =
this=20
fixes the problem. My patch on Sunday will include this change. =
</FONT></DIV>
<DIV><FONT size=3D2>In Christ,</FONT></DIV>
<DIV><FONT size=3D2>David Trotz</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0007_01C0F2AE.CA8D8F00--