From 73ed77bf66d294a7e548dfa519ba11691ffcb617 Mon Sep 17 00:00:00 2001 From: Dekel Tsur Date: Sat, 20 Jul 2002 17:41:12 +0000 Subject: [PATCH] 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 --- src/BufferView_pimpl.C | 10 +++++++--- src/ChangeLog | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 6362e88c79..ac9e66ca23 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -794,9 +794,13 @@ 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())) { - bv_->text->cursor.par()->bibkey->edit(bv_, 0, 0, mouse_button::none); + 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; diff --git a/src/ChangeLog b/src/ChangeLog index 04558c167e..8125074fd8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-07-20 Dekel Tsur + + * BufferView_pimpl.C (workAreaButtonRelease): Fix opening of + a bibitem inset in a RTL paragraph. + 2002-07-20 John Levon * paragraph_pimpl.C: constify -- 2.39.2