From 12e8d09ed1cff52349a51ca7eb39eeb35f4f9456 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 20 Sep 2011 11:46:45 +0000 Subject: [PATCH] Added a half second sleep after calling system command when the command is run in the background so that this command has a chance to run and open a window before the calling present3D moves on to the next frame. --- src/osgPresentation/PickEventHandler.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/osgPresentation/PickEventHandler.cpp b/src/osgPresentation/PickEventHandler.cpp index 797c4a2f9..e32457685 100644 --- a/src/osgPresentation/PickEventHandler.cpp +++ b/src/osgPresentation/PickEventHandler.cpp @@ -161,10 +161,21 @@ void PickEventHandler::doOperation() } #endif + + bool commandRunsInBackground = (_command.find("&")!=std::string::npos); + int result = system(_command.c_str()); OSG_INFO<<"system("<<_command<<") result "<