From 577779961a0535e3864da091167f3dce5f00aeae Mon Sep 17 00:00:00 2001 From: gambas Date: Wed, 17 Jun 2020 18:26:08 +0200 Subject: [PATCH] Negative values are replaced by zero when setting Application.Busy. [GB.GTK] * NEW: Negative values are replaced by zero when setting Application.Busy. [GB.GTK3] * NEW: Negative values are replaced by zero when setting Application.Busy. [GB.QT4] * NEW: Negative values are replaced by zero when setting Application.Busy. [GB.QT5] * NEW: Negative values are replaced by zero when setting Application.Busy. --- gb.gtk/src/CScreen.cpp | 2 ++ gb.qt4/src/CScreen.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gb.gtk/src/CScreen.cpp b/gb.gtk/src/CScreen.cpp index 2249d8949..e824a1f56 100644 --- a/gb.gtk/src/CScreen.cpp +++ b/gb.gtk/src/CScreen.cpp @@ -199,6 +199,8 @@ BEGIN_PROPERTY(Application_Busy) else { busy = VPROP(GB_INTEGER); + if (busy < 0) + busy = 0; if (_busy == 0 && busy != 0) gApplication::setBusy(true); diff --git a/gb.qt4/src/CScreen.cpp b/gb.qt4/src/CScreen.cpp index a48a66894..1a7c7775b 100644 --- a/gb.qt4/src/CScreen.cpp +++ b/gb.qt4/src/CScreen.cpp @@ -225,6 +225,8 @@ BEGIN_PROPERTY(Application_Busy) else { busy = VPROP(GB_INTEGER); + if (busy < 0) + busy = 0; if (screen_busy == 0 && busy > 0) qApp->setOverrideCursor(Qt::WaitCursor);