this->Modified();
vtkMapper *aMapper = myPipeLine->GetMapper();
vtkDataSet *aDataSet = aMapper->GetInput();
- if(!aDataSet)
- throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no input data !!!");
- aDataSet->Update();
- static float eps = VTK_LARGE_FLOAT * 0.1 ;
- if(aDataSet->GetLength() > eps)
- throw std::runtime_error("VISU_Actor::SetPipeLine >> Diagonal of the actor is too large !!!");
- if(!aDataSet->GetNumberOfCells())
- throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no visible elements");
+
+ //This code has been moved into VISU::Prs3d_i::UpdateActor() for bug 9808
+ //if(!aDataSet)
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no input data !!!");
+ //aDataSet->Update();
+ //static float eps = VTK_LARGE_FLOAT * 0.1 ;
+ //if(aDataSet->GetLength() > eps)
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> Diagonal of the actor is too large !!!");
+ //if(!aDataSet->GetNumberOfCells())
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no visible elements");
+
//Bug SAL4221: Mesh with less than 10 cells : shrink mode disable
//SetShrinkable(aDataSet->GetNumberOfCells() > 10);
SetShrinkable(thePipeLine->IsShrinkable());
}catch(std::exception& exc){
SUIT_MessageBox::warn1(GetDesktop(theModule),
QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR"),
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
}
QApplication::restoreOverrideCursor();
VISU::Prs3d_i* thePrs)
{
QApplication::setOverrideCursor(Qt::waitCursor);
+ bool isPublished = false;
SALOMEDS::SObject_var aSObject = thePrs->GetSObject();
CORBA::String_var anEntry = aSObject->GetID();
for (int i = 0, iEnd = aViewWindows.size(); i < iEnd; i++) {
SVTK_ViewWindow* aView = aViewWindows[i];
if (VISU_Actor* anActor = FindActor(aView, anEntry.in())) {
+ isPublished = true;
thePrs->UpdateActor(anActor);
}
}
INFOS(ex.what());
QApplication::restoreOverrideCursor();
SUIT_MessageBox::warn1 (GetDesktop(theModule), QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION") + " " + QObject::tr(ex.what()),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(ex.what()),
QObject::tr("BUT_OK"));
TViewWindows aViewWindows = GetViews(theModule);
return;
}
QApplication::restoreOverrideCursor();
+
+ if (!isPublished)
+ PublishInView(theModule, thePrs);
}
static bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow,
INFOS(exc.what());
SUIT_MessageBox::warn1 (GetDesktop(theModule),
QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_CREATE_ACTOR") + " " + QObject::tr(exc.what()),
+ QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
QObject::tr("BUT_OK"));
}
}
void VISU::Prs3d_i::UpdateActor(VISU_Actor* theActor) {
if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor() - this = "<<this);
- theActor->GetMapper()->ShallowCopy(myPipeLine->GetMapper());
+
+ // fix for bug 9808 BEGIN
+ vtkMapper *aMapper = myPipeLine->GetMapper();
+ vtkDataSet *aDataSet = aMapper->GetInput();
+ if (!aDataSet)
+ throw std::runtime_error("There is no input data !!!");
+ aDataSet->Update();
+ static float eps = VTK_LARGE_FLOAT * 0.1 ;
+ if (!aDataSet->GetNumberOfCells())
+ throw std::runtime_error("There is no visible elements");
+ if (aDataSet->GetLength() > eps)
+ throw std::runtime_error("Diagonal of the actor is too large !!!");
+ // fix for bug 9808 END
+
+ //theActor->GetMapper()->ShallowCopy(myPipeLine->GetMapper());
+ theActor->GetMapper()->ShallowCopy(aMapper);
theActor->SetPosition(myOffset);
theActor->Modified();
}