mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 02:52:04 +05:00
- Added a missing icon
- Fixed a small bug : it was impossible to select a working plane when the rectangle contructor was selected - Disabled autoapply which was unused
This commit is contained in:
parent
c7b349c32d
commit
c99ec79603
@ -113,12 +113,13 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg( GeometryGUI* GUI, QWidget* parent,
|
|||||||
MainWidget->buttonClose->setText( tr( "GEOM_BUT_CLOSE_SKETCH" ) );
|
MainWidget->buttonClose->setText( tr( "GEOM_BUT_CLOSE_SKETCH" ) );
|
||||||
MainWidget->buttonHelp->setText( tr( "GEOM_BUT_HELP" ) );
|
MainWidget->buttonHelp->setText( tr( "GEOM_BUT_HELP" ) );
|
||||||
|
|
||||||
QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_UNDO" ) ) );
|
QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_UNDO" ) ) );
|
||||||
QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_REDO" ) ) );
|
QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_REDO" ) ) );
|
||||||
QPixmap image3( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
|
QPixmap image3( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
|
||||||
QPixmap image4( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_ARC" ) ) );
|
QPixmap image4( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_ARC" ) ) );
|
||||||
QPixmap image5 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
|
QPixmap image5 (aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
|
QPixmap image6 (aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_RECTANGLE" ) ) );
|
||||||
|
|
||||||
setWindowTitle( tr( "GEOM_SKETCHER_TITLE" ) );
|
setWindowTitle( tr( "GEOM_SKETCHER_TITLE" ) );
|
||||||
|
|
||||||
@ -127,6 +128,8 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg( GeometryGUI* GUI, QWidget* parent,
|
|||||||
MainWidget->RadioButton1->setIcon( image3 );
|
MainWidget->RadioButton1->setIcon( image3 );
|
||||||
MainWidget->RadioButton2->setText( "" );
|
MainWidget->RadioButton2->setText( "" );
|
||||||
MainWidget->RadioButton2->setIcon( image4 );
|
MainWidget->RadioButton2->setIcon( image4 );
|
||||||
|
MainWidget->RadioButton3->setText( "" );
|
||||||
|
MainWidget->RadioButton3->setIcon( image6 );
|
||||||
MainWidget->GroupDest->setTitle( tr( "GEOM_SKETCHER_DEST" ) );
|
MainWidget->GroupDest->setTitle( tr( "GEOM_SKETCHER_DEST" ) );
|
||||||
MainWidget->GroupDest1->setTitle( tr( "GEOM_SKETCHER_TYPE" ) );
|
MainWidget->GroupDest1->setTitle( tr( "GEOM_SKETCHER_TYPE" ) );
|
||||||
MainWidget->RB_Dest1->setText( tr( "GEOM_SKETCHER_POINT" ) );
|
MainWidget->RB_Dest1->setText( tr( "GEOM_SKETCHER_POINT" ) );
|
||||||
@ -619,6 +622,11 @@ void EntityGUI_SketcherDlg::TypeClicked( int constructorId )
|
|||||||
void EntityGUI_SketcherDlg::RectClicked()
|
void EntityGUI_SketcherDlg::RectClicked()
|
||||||
{
|
{
|
||||||
InitClick();
|
InitClick();
|
||||||
|
|
||||||
|
// Connect the selction manager (disconnected in InitClick())
|
||||||
|
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||||
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
GroupRect->show();
|
GroupRect->show();
|
||||||
|
|
||||||
myX1=0;
|
myX1=0;
|
||||||
@ -859,7 +867,7 @@ void EntityGUI_SketcherDlg::Point2Clicked( int constructorId )
|
|||||||
}
|
}
|
||||||
resize( minimumSizeHint() );
|
resize( minimumSizeHint() );
|
||||||
connect( myGeometryGUI->getApp()->selectionMgr(),
|
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1368,7 +1376,7 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
|||||||
AddLocalCS(aSelectedObject.get());
|
AddLocalCS(aSelectedObject.get());
|
||||||
selButton->setDown(false);
|
selButton->setDown(false);
|
||||||
WPlaneLineEdit->setEnabled(false);
|
WPlaneLineEdit->setEnabled(false);
|
||||||
TypeClicked( 0 );
|
TypeClicked( myConstructorId );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1648,11 +1656,14 @@ void EntityGUI_SketcherDlg::closeEvent( QCloseEvent* e )
|
|||||||
void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, const gp_Pnt& thePnt,
|
void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, const gp_Pnt& thePnt,
|
||||||
bool isStart )
|
bool isStart )
|
||||||
{
|
{
|
||||||
SUIT_ViewWindow* theViewWindow = getDesktop()->activeWindow();
|
// NOTE Basing the autoapply functionnality on the background picture has no sense anymore
|
||||||
OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
|
// The import picture functionnality is now used for drawing on top of a picture
|
||||||
|
|
||||||
QString theImgFileName;
|
// SUIT_ViewWindow* theViewWindow = getDesktop()->activeWindow();
|
||||||
vp->background().texture( theImgFileName ); ////////////// VSR: temporarily
|
// OCCViewer_ViewPort3d* vp = ((OCCViewer_ViewWindow*)theViewWindow)->getViewPort();
|
||||||
|
//
|
||||||
|
// QString theImgFileName;
|
||||||
|
// vp->background().texture( theImgFileName ); ////////////// VSR: temporarily
|
||||||
|
|
||||||
double x, y;
|
double x, y;
|
||||||
x = y = 0;
|
x = y = 0;
|
||||||
@ -1671,7 +1682,8 @@ void EntityGUI_SketcherDlg::OnPointSelected(Qt::KeyboardModifiers modifiers, con
|
|||||||
gp_Pnt aTrsfPnt;
|
gp_Pnt aTrsfPnt;
|
||||||
GEOMBase::VertexToPoint( aShape, aTrsfPnt );
|
GEOMBase::VertexToPoint( aShape, aTrsfPnt );
|
||||||
|
|
||||||
autoApply = ( (getPnt2ConstructorId() == 1) && (!theImgFileName.isEmpty()) ); // If no additional argument needed after selection and there is a backgroundimage
|
// NOTE autoapply disabled : doesn't seem useful anymore
|
||||||
|
// autoApply = ( (getPnt2ConstructorId() == 1) && (!theImgFileName.isEmpty()) ); // If no additional argument needed after selection and there is a backgroundimage
|
||||||
// -> apply automatically
|
// -> apply automatically
|
||||||
|
|
||||||
if ( getPnt1ConstructorId() == 0 ){ // Relative selection mode
|
if ( getPnt1ConstructorId() == 0 ){ // Relative selection mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user