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")
{
SnapmaticWidget *picWidget = (SnapmaticWidget*)widget;
SnapmaticPicture *picture = picWidget->getPicture();
QString fileName = picture->getPictureFileName();
QString fileName = picWidget->getPicturePath();
if (!QFile::exists(fileName) || QFile::remove(fileName))
{
pictureDeleted_f(picWidget);