mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-14 02:30:35 +05:00
Improve error reporting for Filling Surface; initialize myGeometryGUI in FillingDlg to avoid exception on initialization of the dialog
This commit is contained in:
parent
c03f2eac0d
commit
774da7a735
@ -893,12 +893,15 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
|
|||||||
//Compute the Solid value
|
//Compute the Solid value
|
||||||
try {
|
try {
|
||||||
if (!GetSolver()->ComputeFunction(aFunction)) {
|
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||||
SetErrorCode("Fiiling driver failed");
|
SetErrorCode("Filling driver failed");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
if (strcmp(aFail->GetMessageString(), "Geom_BSplineSurface") == 0)
|
||||||
|
SetErrorCode("B-Spline surface construction failed");
|
||||||
|
else
|
||||||
SetErrorCode(aFail->GetMessageString());
|
SetErrorCode(aFail->GetMessageString());
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -57,11 +57,14 @@
|
|||||||
// The dialog will by default be modeless, unless you set 'modal' to
|
// The dialog will by default be modeless, unless you set 'modal' to
|
||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl)
|
GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
:GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
const char* name, bool modal, WFlags fl)
|
||||||
|
:GEOMBase_Skeleton(parent, name, modal,
|
||||||
|
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
|
||||||
|
myGeometryGUI(theGeometryGUI)
|
||||||
{
|
{
|
||||||
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FILLING")));
|
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_FILLING")));
|
||||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
||||||
|
|
||||||
setCaption(tr("GEOM_FILLING_TITLE"));
|
setCaption(tr("GEOM_FILLING_TITLE"));
|
||||||
|
|
||||||
@ -89,7 +92,6 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI,
|
|||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ~GenerationGUI_FillingDlg()
|
// function : ~GenerationGUI_FillingDlg()
|
||||||
// purpose : Destroys the object and frees any allocated resources
|
// purpose : Destroys the object and frees any allocated resources
|
||||||
@ -99,7 +101,6 @@ GenerationGUI_FillingDlg::~GenerationGUI_FillingDlg()
|
|||||||
// no need to delete child widgets, Qt does it all for us
|
// no need to delete child widgets, Qt does it all for us
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : Init()
|
// function : Init()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -268,7 +269,8 @@ void GenerationGUI_FillingDlg::LineEditReturnPressed()
|
|||||||
void GenerationGUI_FillingDlg::ActivateThisDialog()
|
void GenerationGUI_FillingDlg::ActivateThisDialog()
|
||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
||||||
|
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||||
globalSelection( GEOM_COMPOUND );
|
globalSelection( GEOM_COMPOUND );
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
@ -341,4 +343,3 @@ bool GenerationGUI_FillingDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user