VirtualBox

Changeset 69331 in vbox for trunk/src/VBox/Main/src-all


Ignore:
Timestamp:
Oct 26, 2017 9:59:30 AM (7 years ago)
Author:
vboxsync
Message:

bugref:8674. Progress updates percent of execution only if new value differs from old value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/ProgressImpl.cpp

    r69002 r69331  
    564564        {
    565565            if (uPercentage > pThis->m_ulOperationPercent)
    566                 pThis->m_ulOperationPercent = RT_MIN(uPercentage, 100);
     566                pThis->setCurrentOperationProgress(uPercentage);
    567567        }
    568568        else
     
    571571            vrc = VERR_CANCELLED;
    572572        }
    573         ULONG actualPercent = 0;
    574         pThis->getPercent(&actualPercent);
    575         fireProgressPercentageChangedEvent(pThis->pEventSource, pThis->mId.toUtf16().raw(), actualPercent);
    576573    }
    577574    /* else ignored */
     
    822819    AssertReturn(!mCompleted && !mCanceled, E_FAIL);
    823820
    824     m_ulOperationPercent = aPercent;
    825 
    826     ULONG actualPercent = 0;
    827     getPercent(&actualPercent);
    828     fireProgressPercentageChangedEvent(pEventSource, mId.toUtf16().raw(), actualPercent);
     821    if (m_ulOperationPercent != aPercent)
     822    {
     823        m_ulOperationPercent = aPercent;
     824        ULONG actualPercent = 0;
     825        getPercent(&actualPercent);
     826        fireProgressPercentageChangedEvent(pEventSource, mId.toUtf16().raw(), actualPercent);
     827    }
    829828
    830829    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette