]> git.lyx.org Git - lyx.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>
Wed, 25 Jul 2018 09:38:56 +0000 (11:38 +0200)
Some InfoInsets have to be LTR always.

src/insets/InsetInfo.cpp
src/insets/InsetInfo.h

index 97fe6ff06ec5380fc27fb88148ccb31ae36c00b6..3cec4ee77df36a9a34465e7921ce5673b02e7b7c 100644 (file)
@@ -94,7 +94,7 @@ NameTranslator const & nameTranslator()
 
 InsetInfo::InsetInfo(Buffer * buf, string const & name)
        : InsetCollapsible(buf), initialized_(false), 
-         type_(UNKNOWN_INFO), name_()
+         type_(UNKNOWN_INFO), name_(), force_ltr_(false)
 {
        setInfo(name);
        status_ = Collapsed;
@@ -299,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_;
 }
 
 
@@ -314,6 +314,7 @@ void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) {
 
        BufferParams const & bp = buffer().params();
 
+       force_ltr_ = false;
        switch (type_) {
        case UNKNOWN_INFO:
                error("Unknown Info: %1$s");
@@ -337,6 +338,7 @@ void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) {
                        setText(bindings.begin()->print(KeySequence::Portable));
                else
                        setText(theTopLevelKeymap().printBindings(func, KeySequence::Portable));
+               force_ltr_ = true;
                break;
        }
        case LYXRC_INFO: {
index 4a1637fd8216e73d8bbb9f31f2a7f6c441f032a6..9ac63489fb528896beb148a010c44338b9b4a23a 100644 (file)
@@ -155,6 +155,8 @@ private:
        info_type type_;
        ///
        std::string name_;
+       ///
+       bool force_ltr_;
 };