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

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

View File

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

View 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