From 1ffdb3278d27b8bc7761d45bf3822281f76e2dc4 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 3 Dec 2009 14:15:20 +0000 Subject: [PATCH] IPAL21489 Filter by Scalars... does not show visible elements for some presentations. --- doc/salome/gui/VISU/input/viewing_3d_presentations.doc | 2 ++ src/VISUGUI/VISU_msg_en.ts | 4 ++++ src/VISU_I/VISU_Prs3d_i.cc | 10 ++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/salome/gui/VISU/input/viewing_3d_presentations.doc b/doc/salome/gui/VISU/input/viewing_3d_presentations.doc index b4545de6..40ad0203 100644 --- a/doc/salome/gui/VISU/input/viewing_3d_presentations.doc +++ b/doc/salome/gui/VISU/input/viewing_3d_presentations.doc @@ -28,6 +28,8 @@ viewer. has been created and change its parameters.
  • Filter by Scalars - allows showing only the cells with values that fit into the defined Scalar Range. +
    If the presentation is created on nodes, only the cells with all +nodes lying in the range defined by the scalar filter will be visible. \image html viewing2.png diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts index f8fddcb9..7a04f283 100644 --- a/src/VISUGUI/VISU_msg_en.ts +++ b/src/VISUGUI/VISU_msg_en.ts @@ -454,6 +454,10 @@ Do you want to enlarge the cache? WRN_NO_AVAILABLE_DATA No Available data in selection + + WRN_NO_VISIBLE_ELEMENTS + There are no visible elements. + WRN_STUDY_LOCKED Current Study is locked diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index 620cf98d..4f61facd 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -33,6 +33,7 @@ #include "SALOME_Event.h" #include "SUIT_ResourceMgr.h" +#include "SUIT_MessageBox.h" #include #include @@ -382,8 +383,13 @@ VISU::Prs3d_i aDataSet->Update(); static float eps = VTK_LARGE_FLOAT * 0.1 ; - if (!aDataSet->GetNumberOfCells()) - throw std::runtime_error("There are no visible elements"); + if (!aDataSet->GetNumberOfCells()) { + SUIT_MessageBox::warning( 0, + QObject::tr("WRN_VISU"), + QObject::tr("WRN_NO_VISIBLE_ELEMENTS"), + QObject::tr("BUT_OK")); + return; + } if (aDataSet->GetLength() > eps) throw std::runtime_error("Diagonal of the actor is too large !!!"); -- 2.39.2