diff --git a/retroshare-gui/src/gui/xprogressbar.cpp b/retroshare-gui/src/gui/xprogressbar.cpp index 9550cce50..b0909a1f6 100644 --- a/retroshare-gui/src/gui/xprogressbar.cpp +++ b/retroshare-gui/src/gui/xprogressbar.cpp @@ -196,22 +196,25 @@ void xProgressBar::paint() uint32_t ss = _pinfo.nb_chunks ; if(ss > 1) // for small files we use a more progressive display - for(int i=0;i0 && o >= 1.0f) // limits the number of regions drawn + { + if(!_pinfo.cmap._map.empty()) + for(int i=0;isetOpacity(o) ; - painter->drawRect(rect.x() + hSpan+(int)rint(i*width/(float)ss), rect.y() + vSpan, (int)ceil(j*width/(float)ss), rect.height() - 1 - vSpan * 2); - } + int j=0 ; + while(i+j0 && o >= 1.0f) // limits the number of regions drawn + { + painter->setOpacity(o) ; + painter->drawRect(rect.x() + hSpan+(int)rint(i*width/(float)ss), rect.y() + vSpan, (int)ceil(j*width/(float)ss), rect.height() - 1 - vSpan * 2); + } + + i += j ; + } + } else { // calculate progress value