Allow entering the '|' char.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3274 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2001-12-29 17:20:57 +00:00
parent 96e0271ecf
commit 3bb41590f2
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2001-12-29 Dekel Tsur <dekelts@tau.ac.il>
* FormMathsMatrix.C (AlignFilter): Allow entering the '|' char.
2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* DropDown.C: always include <config.h> in sources.

View File

@ -15,6 +15,8 @@
#pragma implementation
#endif
#include <algorithm>
#include "FormMathsMatrix.h"
#include "form_maths_matrix.h"
#include "Dialogs.h"
@ -116,12 +118,13 @@ bool FormMathsMatrix::input(FL_OBJECT * ob, long)
int FormMathsMatrix::AlignFilter(char const * cur, int c)
{
size_t len = strlen(cur);
int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5) -
int(strlen(cur));
int(len) + std::count(cur, cur+len, '|');
if (n < 0)
return FL_INVALID;
if (c == 'c' || c == 'l' || c == 'r')
if (c == 'c' || c == 'l' || c == 'r' || c == '|')
return FL_VALID;
return FL_INVALID;