Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting issue: An extra line and line feed is issued at the top of some buttons #115

Closed
GeneMosher opened this issue Jan 6, 2021 · 1 comment · Fixed by #116
Closed

Comments

@GeneMosher
Copy link
Member

An extra line and line feed is issued at the top of some pages after text headers are printed. The bug can be seen when selecting the 'Displays & Tablets' button located at the right on Page One. The button in this case displaying the unnecessary line is a Button Type 'Hardware'.

The bug can also be seen in another button on page -61, Revenue & Productivity Analysis Report, where Button Type 'Report' and Report Type 'System Balance' also displays this line. (To see this, Select 13524 > Administration > Manager's Gateway > Reports > Revenue & Productivity.) The color of the extra line is always black and seems to be printed after any text is printed at the top of the buttons. Any lines at the top which are colored are OK.

The bug also shows on the remote kitchen and bar pages which are also located at the right on Page One if any menu items have been ordered. The buttons on these pages are: Button Type 'Report', Report Type 'Check'.

@NeroBurner
Copy link
Contributor

Is the following screenshot showing the Bug? If I understand right the space below the blue line and the black line should not be there?

image

another screenshot, but this time of the 'Displays & Tablets' view

image

NeroBurner added a commit to NeroBurner/viewtouch that referenced this issue Jan 6, 2021
In 9f10c00 main: report: remove custom DList, updates
the `Report::Text` function was switched to accept `std::string&` instead
of `const char*`. In the conversion the possibility of the char ptr to
be a nullptr was forgotten. A nullptr for text is interpreted as
`draw_a_line`. As `std::string` has no distinction between nullptr and
an empty string introduce the variable `bool draw_a_line` and
reintroduce the `const char*` overloads for `Report::Text` and
`ReportEntry()`.

fixes: ViewTouch#115
NeroBurner added a commit that referenced this issue Jan 7, 2021
In 9f10c00 main: report: remove custom DList, updates
the `Report::Text` function was switched to accept `std::string&` instead
of `const char*`. In the conversion the possibility of the char ptr to
be a nullptr was forgotten. A nullptr for text is interpreted as
`draw_a_line`. As `std::string` has no distinction between nullptr and
an empty string introduce the variable `bool draw_a_line` and
reintroduce the `const char*` overloads for `Report::Text` and
`ReportEntry()`.

Add tests to check ReportEntry constructors with `const char *` and
`std::string`. Especially the new behavior when `nullptr` is passed as
text, which should be the only instance `draw_a_line` should be set to
true.

fixes: #115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants