Return a valid name for "Other" page sizes.
This commit is contained in:
@@ -53,10 +53,13 @@ namespace libglabels
|
|||||||
QStringList Db::mVendorNames;
|
QStringList Db::mVendorNames;
|
||||||
QList<Template*> Db::mTemplates;
|
QList<Template*> Db::mTemplates;
|
||||||
|
|
||||||
|
QString Db::mPaperNameOther;
|
||||||
QString Db::mEmpty = "";
|
QString Db::mEmpty = "";
|
||||||
|
|
||||||
Db::Db()
|
Db::Db()
|
||||||
{
|
{
|
||||||
|
mPaperNameOther = tr("Other");
|
||||||
|
|
||||||
readPapers();
|
readPapers();
|
||||||
readCategories();
|
readCategories();
|
||||||
readVendors();
|
readVendors();
|
||||||
@@ -141,6 +144,11 @@ namespace libglabels
|
|||||||
{
|
{
|
||||||
if ( !id.isNull() && !id.isEmpty() )
|
if ( !id.isNull() && !id.isEmpty() )
|
||||||
{
|
{
|
||||||
|
if ( isPaperIdOther( id ) )
|
||||||
|
{
|
||||||
|
return mPaperNameOther;
|
||||||
|
}
|
||||||
|
|
||||||
const Paper *paper = lookupPaperFromId( id );
|
const Paper *paper = lookupPaperFromId( id );
|
||||||
if ( paper != NULL )
|
if ( paper != NULL )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ namespace libglabels
|
|||||||
|
|
||||||
static QList<Template*> mTemplates;
|
static QList<Template*> mTemplates;
|
||||||
|
|
||||||
|
static QString mPaperNameOther;
|
||||||
static QString mEmpty;
|
static QString mEmpty;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user