mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 06:15:23 -04:00
Don't display warning 222 in GUI
This commit is contained in:
parent
d2161ffb20
commit
baf56daa17
1 changed files with 4 additions and 4 deletions
|
@ -81,9 +81,8 @@ namespace Zint {
|
|||
QByteArray bstr = m_text.toUtf8();
|
||||
QByteArray pstr = m_primaryMessage.left(99).toLatin1();
|
||||
strcpy(m_zintSymbol->primary, pstr.data());
|
||||
int error = ZBarcode_Encode(m_zintSymbol, (unsigned char*) bstr.data(), bstr.length());
|
||||
if (error > ZINT_WARN_INVALID_OPTION)
|
||||
m_lastError = m_zintSymbol->errtxt;
|
||||
m_error = ZBarcode_Encode(m_zintSymbol, (unsigned char*) bstr.data(), bstr.length());
|
||||
m_lastError = m_zintSymbol->errtxt;
|
||||
|
||||
if (m_zintSymbol->symbology == BARCODE_MAXICODE)
|
||||
m_zintSymbol->height = 33;
|
||||
|
@ -317,7 +316,8 @@ namespace Zint {
|
|||
QFont fontLarge(fontstyle);
|
||||
fontLarge.setPixelSize(fontPixelSizeLarge);
|
||||
|
||||
if (m_lastError.length()) {
|
||||
if (m_error >= 5) {
|
||||
// Display error message instead of barcode
|
||||
fontLarge.setPointSize(14);
|
||||
painter.setFont(fontLarge);
|
||||
painter.drawText(paintRect, Qt::AlignCenter, m_lastError);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue