From ae8c0b29769915967c91d5923c2c02a695137f0f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 25 Jul 2018 11:38:56 +0200 Subject: [PATCH] Amend 79cf3f5ec10 Some InfoInsets have to be LTR always. --- src/insets/InsetInfo.cpp | 7 +++++-- src/insets/InsetInfo.h | 2 ++ status.23x | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 9a8d2dd1a4..3205cc11d4 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -93,7 +93,8 @@ NameTranslator const & nameTranslator() InsetInfo::InsetInfo(Buffer * buf, string const & name) - : InsetCollapsible(buf), type_(UNKNOWN_INFO), name_() + : InsetCollapsible(buf), type_(UNKNOWN_INFO), name_(), + force_ltr_(false) { setInfo(name); status_ = Collapsed; @@ -298,7 +299,7 @@ void InsetInfo::setText(docstring const & str) bool InsetInfo::forceLTR() const { - return !buffer().params().language->rightToLeft(); + return !buffer().params().language->rightToLeft() || force_ltr_; } @@ -306,6 +307,7 @@ void InsetInfo::updateInfo() { BufferParams const & bp = buffer().params(); + force_ltr_ = false; switch (type_) { case UNKNOWN_INFO: error("Unknown Info: %1$s"); @@ -327,6 +329,7 @@ void InsetInfo::updateInfo() setText(bindings.begin()->print(KeySequence::Portable)); else setText(theTopLevelKeymap().printBindings(func, KeySequence::Portable)); + force_ltr_ = true; break; } case LYXRC_INFO: { diff --git a/src/insets/InsetInfo.h b/src/insets/InsetInfo.h index 4e3f290cad..36b224e566 100644 --- a/src/insets/InsetInfo.h +++ b/src/insets/InsetInfo.h @@ -153,6 +153,8 @@ private: info_type type_; /// std::string name_; + /// + bool force_ltr_; }; diff --git a/status.23x b/status.23x index d33c3d1e4e..dbe3a4621d 100644 --- a/status.23x +++ b/status.23x @@ -77,6 +77,8 @@ What's new - Fix text direction in figure wrap floats with RTL (bug 11029). +- Fix text direction issue in info insets with RTL context (bug 10463). + * USER INTERFACE -- 2.39.5