summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2014-02-14 15:51:19 +0100
committerArno <am@disconnect.de>2014-02-14 15:51:19 +0100
commitc8a12c10bba1a74282e84f7613d76912c419cd35 (patch)
tree27727664d65767756474387dc5f783d744fefa39 /shemov.cpp
parent424d37e94dbf820e3d0559e0041d6d2cd005f072 (diff)
downloadSheMov-c8a12c10bba1a74282e84f7613d76912c419cd35.tar.gz
SheMov-c8a12c10bba1a74282e84f7613d76912c419cd35.tar.bz2
SheMov-c8a12c10bba1a74282e84f7613d76912c419cd35.zip
Fix size filter in Archive Browser
The size filter filtered more than selectedSize in the statusBar suggested, because it used a differet size. Fix it by using a #define everywhere.
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/shemov.cpp b/shemov.cpp
index fa5be14..830932a 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -309,14 +309,13 @@ void SheMov::newMovieWizardWithFiles(){
void SheMov::setSize(qint64 size){
QLocale l;
QString val;
- const qint64 dvdSize = SmGlobals::instance()->dvdSize();
- qint64 free = dvdSize - size;
- QString selectedSize = l.toString(size / 1024.0 / 1024.0, 'f', 2);
- QString freeSize = l.toString(free / 1024.0 / 1024.0, 'f', 2);
- if(size < dvdSize){
- val = QString("<span style=\"color:#008000\">%1 (%2) MiB</span>").arg(selectedSize).arg(freeSize);
+ qint64 free = DVDSIZE - size;
+ QString selectedSize = l.toString(size);
+ QString freeSize = l.toString(free);
+ if(size < DVDSIZE){
+ val = QString("<span style=\"color:#008000\">%1 (%2)</span>").arg(selectedSize).arg(freeSize);
}else{
- val = QString("<span style=\"color:#ff0000\">%1 (%2) MiB</span>").arg(selectedSize).arg(freeSize);
+ val = QString("<span style=\"color:#ff0000\">%1 (%2)</span>").arg(selectedSize).arg(freeSize);
}
mSelectedSize->setText(val);
}