mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
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:
parent
96e0271ecf
commit
3bb41590f2
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user