Fix bug was make it not possible to delete hidden snapmatics

This commit is contained in:
Rafael 2016-10-27 07:27:06 +02:00
parent 3841ffaac6
commit c6ab678944

View file

@ -770,8 +770,7 @@ void ProfileInterface::deleteSelected()
if (widget->getWidgetType() == "SnapmaticWidget") if (widget->getWidgetType() == "SnapmaticWidget")
{ {
SnapmaticWidget *picWidget = (SnapmaticWidget*)widget; SnapmaticWidget *picWidget = (SnapmaticWidget*)widget;
SnapmaticPicture *picture = picWidget->getPicture(); QString fileName = picWidget->getPicturePath();
QString fileName = picture->getPictureFileName();
if (!QFile::exists(fileName) || QFile::remove(fileName)) if (!QFile::exists(fileName) || QFile::remove(fileName))
{ {
pictureDeleted_f(picWidget); pictureDeleted_f(picWidget);