don't assert if Update(m_maximum) is called twice (replaces patch 995186)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -348,6 +348,15 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
|
|||||||
|
|
||||||
if ( value == m_maximum )
|
if ( value == m_maximum )
|
||||||
{
|
{
|
||||||
|
if ( m_state == Finished )
|
||||||
|
{
|
||||||
|
// ignore multiple calls to Update(m_maximum): it may sometimes be
|
||||||
|
// troublesome to ensure that Update() is not called twice with the
|
||||||
|
// same value (e.g. because of the rounding errors) and if we don't
|
||||||
|
// return now we're going to generate asserts below
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// so that we return true below and that out [Cancel] handler knew what
|
// so that we return true below and that out [Cancel] handler knew what
|
||||||
// to do
|
// to do
|
||||||
m_state = Finished;
|
m_state = Finished;
|
||||||
|
Reference in New Issue
Block a user