]> git.lyx.org Git - features.git/commitdiff
Fix opening of a bibitem inset in a RTL paragraph.
authorDekel Tsur <dekelts@tau.ac.il>
Sat, 20 Jul 2002 17:41:12 +0000 (17:41 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Sat, 20 Jul 2002 17:41:12 +0000 (17:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4726 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog

index 6362e88c7925c08f0ab484079e742be1847f971a..ac9e66ca23d4f57792c528ab1ddfa807e0b190b5 100644 (file)
@@ -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;
index 04558c167ed10d8969c8111eb57e314d3805f779..8125074fd8b17ffc97ad77a0bf74f5a07101a653 100644 (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