mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Update the cover information if a different cover is selected.
This commit is contained in:
parent
062e8a1a8c
commit
910ec62d30
@ -757,15 +757,24 @@ void PropertiesDialog::save()
|
|||||||
|
|
||||||
itr->info.edited = edited;
|
itr->info.edited = edited;
|
||||||
}
|
}
|
||||||
updateComics();
|
|
||||||
if(comics.count() == 1)
|
if(comics.count() == 1)
|
||||||
{
|
{
|
||||||
if(coverChanged)// && coverPageEdit->text().toInt() != *comics[0].info.coverPage)
|
if(coverChanged)// && coverPageEdit->text().toInt() != *comics[0].info.coverPage)
|
||||||
{
|
{
|
||||||
ThumbnailCreator tc(basePath+comics[0].path,basePath+"/.yacreaderlibrary/covers/"+comics[0].info.hash+".jpg", comics[0].info.coverPage.toInt());
|
ThumbnailCreator tc(basePath+comics[0].path,basePath+"/.yacreaderlibrary/covers/"+comics[0].info.hash+".jpg", comics[0].info.coverPage.toInt());
|
||||||
tc.create();
|
tc.create();
|
||||||
|
|
||||||
|
if(tc.getOriginalCoverSize().second > 0)
|
||||||
|
{
|
||||||
|
comics[0].info.originalCoverSize = QString("%1x%2").arg(tc.getOriginalCoverSize().first).arg(tc.getOriginalCoverSize().second);
|
||||||
|
comics[0].info.coverSizeRatio = static_cast<float>(tc.getOriginalCoverSize().first) / tc.getOriginalCoverSize().second;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateComics();
|
||||||
|
|
||||||
close();
|
close();
|
||||||
emit(accepted());
|
emit(accepted());
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,8 @@ class QToolButton;
|
|||||||
void updateCoverPageNumberLabel(int n);
|
void updateCoverPageNumberLabel(int n);
|
||||||
|
|
||||||
bool coverChanged;
|
bool coverChanged;
|
||||||
|
float coverSizeRatio;
|
||||||
|
QString originalCoverSize;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PropertiesDialog(QWidget * parent = 0);
|
PropertiesDialog(QWidget * parent = 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user