mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20: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
|
||||
try {
|
||||
if (!GetSolver()->ComputeFunction(aFunction)) {
|
||||
SetErrorCode("Fiiling driver failed");
|
||||
SetErrorCode("Filling driver failed");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||
if (strcmp(aFail->GetMessageString(), "Geom_BSplineSurface") == 0)
|
||||
SetErrorCode("B-Spline surface construction failed");
|
||||
else
|
||||
SetErrorCode(aFail->GetMessageString());
|
||||
return NULL;
|
||||
}
|
||||
|
@ -57,11 +57,14 @@
|
||||
// The dialog will by default be modeless, unless you set 'modal' to
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
:GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
||||
GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
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 image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
||||
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_FILLING")));
|
||||
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
||||
|
||||
setCaption(tr("GEOM_FILLING_TITLE"));
|
||||
|
||||
@ -89,7 +92,6 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI,
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~GenerationGUI_FillingDlg()
|
||||
// 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
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Init()
|
||||
// purpose :
|
||||
@ -268,7 +269,8 @@ void GenerationGUI_FillingDlg::LineEditReturnPressed()
|
||||
void GenerationGUI_FillingDlg::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 );
|
||||
displayPreview();
|
||||
}
|
||||
@ -341,4 +343,3 @@ bool GenerationGUI_FillingDlg::execute( ObjectList& objects )
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user