From 9ce2a521a69013bdf3389b36a2d0fc5d5f9a10d5 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 31 Oct 2005 15:49:30 +0000 Subject: [PATCH] Fix for bug 10417: Sweep doesn't work --- src/VISUGUI/VisuGUI.cxx | 14 +++++++------- src/VISUGUI/VisuGUI_Tools.cxx | 13 ++++++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 52de37fb..90791a23 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -1577,20 +1577,20 @@ OnSweep() // Sweep QApplication::setOverrideCursor(Qt::waitCursor); - try { - for (int j = 0; j < aCycles; j++) { - for (int i = 0; i <= aSteps; i++) { + for (int j = 0; j < aCycles; j++) { + for (int i = 0; i <= aSteps; i++) { + try { float aPercents = float(i)/aSteps; aPrsObject->SetMapScale(aPercents); aPrsObject->UpdateActor(aActor); vw->getRenderWindow()->getRenderWindow()->Render(); usleep(aTemp); + } catch (std::exception& exc) { + INFOS("Follow exception was occured :\n" << exc.what()); + } catch (...) { + INFOS("Unknown exception was occured!"); } } - } catch (std::exception& exc) { - INFOS("Follow exception was occured :\n" << exc.what()); - } catch (...) { - INFOS("Unknown exception was occured!"); } QApplication::restoreOverrideCursor(); } diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 72f28a92..d18611d1 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -717,9 +717,16 @@ namespace VISU if(aPrs == NULL) continue; if (thePrs == aPrs) { aResActor = anVISUActor->GetParent(); - thePrs->UpdateActor(aResActor); - aResActor->VisibilityOn(); - + try { + thePrs->UpdateActor(aResActor); + aResActor->VisibilityOn(); + } catch (std::runtime_error& ex) { + aResActor->VisibilityOff(); + INFOS(ex.what()); + SUIT_MessageBox::warn1(GetDesktop(theModule), QObject::tr("WRN_VISU"), + QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(ex.what()), + QObject::tr("BUT_OK")); + } } else if (theDispOnly) { anVISUActor->GetParent()->VisibilityOff(); } else { -- 2.39.2