Fix text direction issue for InsetInfo in RTL context

Fixes: #10463
(cherry picked from commit 79cf3f5ec1)
This commit is contained in:
Juergen Spitzmueller 2018-07-25 11:00:00 +02:00
parent b8c62838ec
commit c413f1d81a
2 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "InsetSpecialChar.h" #include "InsetSpecialChar.h"
#include "KeyMap.h" #include "KeyMap.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "Language.h"
#include "LayoutFile.h" #include "LayoutFile.h"
#include "Length.h" #include "Length.h"
#include "LyXAction.h" #include "LyXAction.h"
@ -295,6 +296,12 @@ void InsetInfo::setText(docstring const & str)
} }
bool InsetInfo::forceLTR() const
{
return !buffer().params().language->rightToLeft();
}
void InsetInfo::updateInfo() void InsetInfo::updateInfo()
{ {
BufferParams const & bp = buffer().params(); BufferParams const & bp = buffer().params();

View File

@ -125,6 +125,8 @@ public:
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
/// ///
void doDispatch(Cursor & cur, FuncRequest & cmd); void doDispatch(Cursor & cur, FuncRequest & cmd);
/// Force inset into LTR environment if surroundings are RTL
bool forceLTR() const;
/// ///
void setInfo(std::string const & info); void setInfo(std::string const & info);
/// update info_ and text /// update info_ and text