Fix opening of a bibitem inset in a RTL paragraph.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4726 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2002-07-20 17:41:12 +00:00
parent 0b8aac3f51
commit 73ed77bf66
2 changed files with 12 additions and 3 deletions

View File

@ -794,10 +794,14 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y,
}
// Maybe we want to edit a bibitem ale970302
if (bv_->text->cursor.par()->bibkey && x < 20 +
bibitemMaxWidth(bv_, textclasslist[buffer_->params.textclass].defaultfont())) {
if (bv_->text->cursor.par()->bibkey) {
bool const is_rtl = bv_->text->cursor.par()->isRightToLeftPar(buffer_->params);
int const width = bibitemMaxWidth(bv_, textclasslist[buffer_->params.textclass].defaultfont());
if ((is_rtl && x > bv_->text->workWidth(bv_)-20-width) ||
(!is_rtl && x < 20+width)) {
bv_->text->cursor.par()->bibkey->edit(bv_, 0, 0, mouse_button::none);
}
}
return;
}

View File

@ -1,3 +1,8 @@
2002-07-20 Dekel Tsur <dekelts@tau.ac.il>
* BufferView_pimpl.C (workAreaButtonRelease): Fix opening of
a bibitem inset in a RTL paragraph.
2002-07-20 John Levon <moz@compsoc.man.ac.uk>
* paragraph_pimpl.C: constify