Return a valid name for "Other" page sizes.
This commit is contained in:
@@ -53,10 +53,13 @@ namespace libglabels
|
||||
QStringList Db::mVendorNames;
|
||||
QList<Template*> 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 )
|
||||
{
|
||||
|
||||
@@ -128,6 +128,7 @@ namespace libglabels
|
||||
|
||||
static QList<Template*> mTemplates;
|
||||
|
||||
static QString mPaperNameOther;
|
||||
static QString mEmpty;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user