Set default name for file if empty.

--HG--
branch : develop
This commit is contained in:
dismine 2014-02-28 15:06:14 +02:00
parent 466bc98020
commit 1ab3b6c608

View File

@ -122,7 +122,16 @@ void TableWindow::ModelChosen(QVector<VItem*> listDetails, const QString &fileNa
{ {
this->description = description; this->description = description;
QFileInfo fi( fileName ); QString file;
if (fileName.isEmpty())
{
file = tr("untitled");
}
else
{
file = fileName;
}
QFileInfo fi( file );
this->fileName = fi.baseName(); this->fileName = fi.baseName();
this->listDetails = listDetails; this->listDetails = listDetails;