Fixed little bug when we try to save image
--HG-- branch : feature
This commit is contained in:
parent
e838ae811e
commit
b22c5b656a
|
@ -703,6 +703,8 @@ void DialogPatternProperties::SaveImage()
|
||||||
const QString extension = "." + doc->GetImageExtension();
|
const QString extension = "." + doc->GetImageExtension();
|
||||||
QString filter = tr("Images (*") + extension + ")";
|
QString filter = tr("Images (*") + extension + ")";
|
||||||
QString filename = QFileDialog::getSaveFileName(this, tr("Save File"), tr("untitled"), filter, &filter);
|
QString filename = QFileDialog::getSaveFileName(this, tr("Save File"), tr("untitled"), filter, &filter);
|
||||||
|
if (not filename.isEmpty())
|
||||||
|
{
|
||||||
if (not filename.endsWith(extension.toUpper()))
|
if (not filename.endsWith(extension.toUpper()))
|
||||||
{
|
{
|
||||||
filename.append(extension);
|
filename.append(extension);
|
||||||
|
@ -714,6 +716,7 @@ void DialogPatternProperties::SaveImage()
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogPatternProperties::ShowImage()
|
void DialogPatternProperties::ShowImage()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user