-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// GEOM GEOMGUI : GUI for Geometry component
// File : PrimitiveGUI_DiskDlg.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
//=================================================================================
PrimitiveGUI_DiskDlg::PrimitiveGUI_DiskDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
bool modal, Qt::WindowFlags fl)
- : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl),
- myInitial(true)
+ : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
{
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_DISK_PNT_VEC_R")));
double aStep = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
// min, max, step and decimals for spin boxes & initial values
- initSpinBox(GroupPntVecR->SpinBox_DX, 0.00001, COORD_MAX, aStep, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
- initSpinBox(GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, aStep, 5); // VSR: TODO: DBL_DIGITS_DISPLAY
+ initSpinBox(GroupPntVecR->SpinBox_DX, 0.00001, COORD_MAX, aStep, "length_precision" );
+ initSpinBox(GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, aStep, "length_precision" );
// init variables
myEditCurrentArgument = GroupPntVecR->LineEdit1;
qApp->processEvents();
updateGeometry();
resize(minimumSizeHint());
+ SelectionIntoArgument();
- if (myInitial) {
- myInitial = false;
- if (constructorId == 1 || constructorId == 2) {
- // on dialog initialization we init the first field with a selected object (if any)
- SelectionIntoArgument();
- }
- else {
- displayPreview();
- }
- }
- else {
- displayPreview();
- }
+ displayPreview();
}
//=================================================================================
// nbSel == 1
Handle(SALOME_InteractiveObject) anIO = aSelList.First();
- Standard_Boolean testResult = Standard_False;
- GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(anIO, testResult);
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO );
- if (!testResult || CORBA::is_nil(aSelectedObject))
+ if ( CORBA::is_nil(aSelectedObject) )
return;
QString aName = GEOMBase::GetName(aSelectedObject);
//Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
- if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
+ if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
}
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
- this, SLOT( SelectionIntoArgument() ) );
+ this, SLOT( SelectionIntoArgument() ) );
ConstructorsClicked( getConstructorId() );
}