Fixed spurious cursor line bug!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1155 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2000-10-25 14:37:39 +00:00
parent ddbec11708
commit 239a2e8928
3 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2000-10-25 Juergen Vigna <jug@sad.it>
* src/screen.C (ShowManualCursor): fixed another uint -> int problem.
2000-10-25 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/filetools.C (MakeRelPath): change some types to

View File

@ -114,7 +114,6 @@ InsetText::~InsetText()
{
for(Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
delete (*cit).second;
// deleteLyXText((*cit).first);
LyXParagraph * p = par->next;
delete par;
while(p) {

View File

@ -242,10 +242,8 @@ bool LyXScreen::FitManualCursor(LyXText * text,
void LyXScreen::ShowManualCursor(LyXText const * text, int x, int y,
int asc, int desc, Cursor_Shape shape)
{
unsigned int y1 = max(y - text->first - asc, 0);
typedef unsigned int uint;
unsigned int y2 = min(y - text->first + desc, (int)owner.height());
int y1 = max(y - text->first - asc, 0);
int y2 = min(y - text->first + desc, (int)owner.height());
// Secure against very strange situations
y2 = max(y2, y1);
@ -255,7 +253,7 @@ void LyXScreen::ShowManualCursor(LyXText const * text, int x, int y,
cursor_pixmap = 0;
}
if (y2 > 0 && y1 < owner.height()) {
if ((y2 > 0) && (y1 < int(owner.height()))) {
cursor_pixmap_h = y2 - y1 + 1;
cursor_pixmap_y = y1;
@ -458,8 +456,6 @@ void LyXScreen::ToggleToggle(LyXText * text, int y_offset, int x_offset)
- text->toggle_end_cursor.row()->baseline()
+ text->toggle_end_cursor.row()->height();
typedef unsigned int uint;
bottom = min(max(bottom, text->first), (int)(text->first + owner.height()));
top = min(max(top, text->first), (int)(text->first + owner.height()));