Fixed export bug for hidden snapmatic when you have opened the file
through the Explorer as example
This commit is contained in:
parent
f645863562
commit
44c6d38d9c
5 changed files with 62 additions and 32 deletions
|
|
@ -261,48 +261,34 @@ void SnapmaticWidget::adjustTextColor()
|
|||
}
|
||||
}
|
||||
|
||||
bool SnapmaticWidget::makePictureVisible()
|
||||
void SnapmaticWidget::makePictureHidden()
|
||||
{
|
||||
if (isHidden())
|
||||
{
|
||||
QString newPicPath = QString(picPath).remove(picPath.length() - 7, 7);
|
||||
if (QFile::rename(picPath, newPicPath))
|
||||
{
|
||||
picPath = newPicPath;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
QString newPicPath = QString(picPath + ".hidden");
|
||||
picPath = newPicPath;
|
||||
}
|
||||
|
||||
bool SnapmaticWidget::makePictureHidden()
|
||||
void SnapmaticWidget::makePictureVisible()
|
||||
{
|
||||
if (!isHidden())
|
||||
{
|
||||
QString newPicPath = QString(picPath + ".hidden");
|
||||
if (QFile::rename(picPath, newPicPath))
|
||||
{
|
||||
picPath = newPicPath;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
QString newPicPath = QString(picPath).remove(picPath.length() - 7, 7);
|
||||
picPath = newPicPath;
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureHiddenSlot()
|
||||
{
|
||||
if (makePictureHidden())
|
||||
SnapmaticPicture *picture = (SnapmaticPicture*)smpic;
|
||||
if (picture->setPictureHidden())
|
||||
{
|
||||
makePictureHidden();
|
||||
adjustTextColor();
|
||||
}
|
||||
}
|
||||
|
||||
void SnapmaticWidget::makePictureVisibleSlot()
|
||||
{
|
||||
if (makePictureVisible())
|
||||
SnapmaticPicture *picture = (SnapmaticPicture*)smpic;
|
||||
if (picture->setPictureVisible())
|
||||
{
|
||||
makePictureVisible();
|
||||
adjustTextColor();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue