added viewable condition to all updates to gain CPU

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.4.x@1826 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2009-11-14 22:58:46 +00:00
parent ff55eb45da
commit d673c55c98
2 changed files with 9 additions and 0 deletions

View File

@ -125,6 +125,9 @@ LinksDialog::LinksDialog(QWidget *parent)
void LinksDialog::checkUpdate()
{
if(!isVisible())
return ;
/* update */
if (!rsRanks)
return;

View File

@ -271,6 +271,9 @@ void TransfersDialog::playSelectedTransfer()
void TransfersDialog::updateProgress(int value)
{
if(!isVisible())
return ;
for(int i = 0; i <= DLListModel->rowCount(); i++) {
if(selection->isRowSelected(i, QModelIndex())) {
editItem(i, PROGRESS, QVariant((double)value));
@ -381,6 +384,9 @@ void TransfersDialog::editItem(int row, int column, QVariant data)
/* get the list of Transfers from the RsIface. **/
void TransfersDialog::insertTransfers()
{
if(!isVisible())
return ;
QString symbol, name, sources, status, coreId;
qlonglong fileSize, completed, remaining;
double progress, dlspeed;