Some InfoInsets have to be LTR always.
This commit is contained in:
Juergen Spitzmueller 2018-07-25 11:38:56 +02:00
parent 79cf3f5ec1
commit d1ec35a0dc
2 changed files with 6 additions and 2 deletions

View 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: {

View File

@ -155,6 +155,8 @@ private:
info_type type_;
///
std::string name_;
///
bool force_ltr_;
};