From eff40a7600c286a908b5d2b4077cd449f907f35c Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 17 Nov 2013 18:01:37 -0500 Subject: [PATCH] Return a valid name for "Other" page sizes. --- libglabels/Db.cpp | 8 ++++++++ libglabels/Db.h | 1 + 2 files changed, 9 insertions(+) diff --git a/libglabels/Db.cpp b/libglabels/Db.cpp index b0890eb..44da443 100644 --- a/libglabels/Db.cpp +++ b/libglabels/Db.cpp @@ -53,10 +53,13 @@ namespace libglabels QStringList Db::mVendorNames; QList Db::mTemplates; + QString Db::mPaperNameOther; QString Db::mEmpty = ""; Db::Db() { + mPaperNameOther = tr("Other"); + readPapers(); readCategories(); readVendors(); @@ -141,6 +144,11 @@ namespace libglabels { if ( !id.isNull() && !id.isEmpty() ) { + if ( isPaperIdOther( id ) ) + { + return mPaperNameOther; + } + const Paper *paper = lookupPaperFromId( id ); if ( paper != NULL ) { diff --git a/libglabels/Db.h b/libglabels/Db.h index 676dfe3..033fdcd 100644 --- a/libglabels/Db.h +++ b/libglabels/Db.h @@ -128,6 +128,7 @@ namespace libglabels static QList mTemplates; + static QString mPaperNameOther; static QString mEmpty; };