//
#include "SUITApp_Application.h"
+#include "SUIT_Session.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ExceptionHandler.h"
*/
bool SUITApp_Application::notify( QObject* receiver, QEvent* e )
{
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) < 0x060101
+ // Disable GUI user actions while python command is executed
+ if (SUIT_Session::IsPythonExecuted()) {
+ // Disable mouse and keyboard events
+ QEvent::Type aType = e->type();
+ if (aType == QEvent::MouseButtonPress || aType == QEvent::MouseButtonRelease ||
+ aType == QEvent::MouseButtonDblClick || aType == QEvent::MouseMove ||
+ aType == QEvent::Wheel || aType == QEvent::ContextMenu ||
+ aType == QEvent::KeyPress || aType == QEvent::KeyRelease ||
+ aType == QEvent::Accel || aType == QEvent::AccelOverride)
+ return false;
+ }
+#endif
+
return myExceptHandler ? myExceptHandler->handle( receiver, e ) :
QApplication::notify( receiver, e );
}