]> git.lyx.org Git - features.git/commitdiff
Amend 79cf3f5ec10
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 25 Jul 2018 09:38:56 +0000 (11:38 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 9 Sep 2018 17:35:24 +0000 (19:35 +0200)
Some InfoInsets have to be LTR always.

src/insets/InsetInfo.cpp
src/insets/InsetInfo.h
status.23x

index 9a8d2dd1a41b7e433500059f5060b8d45b003b06..3205cc11d45f34a5e9c6060cbb08d5adc00b9a53 100644 (file)
@@ -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: {
index 4e3f290cad60cf32c707c8ad709f06ca567c4956..36b224e56648e655c321b95d73eb21b406f42314 100644 (file)
@@ -153,6 +153,8 @@ private:
        info_type type_;
        ///
        std::string name_;
+       ///
+       bool force_ltr_;
 };
 
 
index d33c3d1e4e1cd08dbb1f05ff5ad6cd38783b8d2d..dbe3a4621dcbda60e71e48496e8b0d0f190dfd5f 100644 (file)
@@ -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