Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
9b4c8ea5
Commit
9b4c8ea5
authored
Aug 06, 2022
by
Volker Krause
Browse files
Work around RCT2 fields claiming to have a 0x0 size
Found in PKP samples.
parent
af8731a5
Pipeline
#213764
passed with stage
in 3 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/uic9183/uic9183ticketlayout.cpp
View file @
9b4c8ea5
...
...
@@ -151,10 +151,13 @@ QString Uic9183TicketLayout::text(int row, int column, int width, int height) co
}
for
(
auto
f
=
firstField
();
!
f
.
isNull
();
f
=
f
.
next
())
{
if
(
f
.
row
()
+
f
.
height
()
-
1
<
row
||
f
.
row
()
>
row
+
height
-
1
)
{
// there's non-compliant samples out there with zero field sizes...
const
auto
effectiveHeight
=
std
::
max
(
f
.
height
(),
1
);
if
(
f
.
row
()
+
effectiveHeight
-
1
<
row
||
f
.
row
()
>
row
+
height
-
1
)
{
continue
;
}
if
(
f
.
column
()
+
f
.
width
()
-
1
<
column
||
f
.
column
()
>
column
+
width
-
1
)
{
const
auto
effectiveFieldWidth
=
f
.
width
()
>
0
?
f
.
width
()
:
f
.
size
();
if
(
f
.
column
()
+
effectiveFieldWidth
-
1
<
column
||
f
.
column
()
>
column
+
width
-
1
)
{
continue
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment