mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-25 06:12:04 +05:00
NPAL16010 (Sketcher Apply non available if only one line is modified)
call ValueChangedInSpinBox() as soon as value text changes
This commit is contained in:
parent
2001e82cc5
commit
6db71a9f9d
@ -253,7 +253,6 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent,
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~EntityGUI_SketcherDlg()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
@ -263,7 +262,6 @@ EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg()
|
||||
myGeometryGUI->SetActiveDialogBox( 0 );
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : eventFilter()
|
||||
// purpose : event filter for spin-boxes to provide Apply action on Return pressed
|
||||
@ -295,6 +293,16 @@ bool EntityGUI_SketcherDlg::eventFilter (QObject* object, QEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::KeyRelease) {
|
||||
// NPAL16010 (Sketcher Apply non available if only one line is modified)
|
||||
// To have Apply active as soon as value text changed
|
||||
QString s = ((QtxDblSpinBox*) object)->text();
|
||||
bool ok;
|
||||
double newVal = s.toDouble( &ok );
|
||||
if ( ok )
|
||||
ValueChangedInSpinBox( newVal );
|
||||
}
|
||||
|
||||
return EntityGUI_Skeleton_QTD::eventFilter(object, event);
|
||||
}
|
||||
|
||||
@ -1096,6 +1104,68 @@ void EntityGUI_SketcherDlg::ValueChangedInSpinBox(double newValue)
|
||||
vz = Group4Spin->SpinBox_DZ->GetValue();
|
||||
vs = newValue;
|
||||
}
|
||||
// NPAL16010 (Sketcher Apply non available if only one line is modified)
|
||||
// if ValueChangedInSpinBox() called from eventFilter()
|
||||
else if ( Group1Spin->SpinBox_DX->hasFocus() )
|
||||
{
|
||||
vx = newValue;
|
||||
}
|
||||
else if ( Group2Spin->SpinBox_DX ->hasFocus() )
|
||||
{
|
||||
vx = newValue;
|
||||
vy = Group2Spin->SpinBox_DY->GetValue();
|
||||
}
|
||||
else if ( Group2Spin->SpinBox_DY->hasFocus() )
|
||||
{
|
||||
vx = Group2Spin->SpinBox_DX->GetValue();
|
||||
vy = newValue;
|
||||
}
|
||||
else if ( Group3Spin->SpinBox_DX->hasFocus() )
|
||||
{
|
||||
vx = newValue;
|
||||
vy = Group3Spin->SpinBox_DY->GetValue();
|
||||
vz = Group3Spin->SpinBox_DZ->GetValue();
|
||||
}
|
||||
else if ( Group3Spin->SpinBox_DY->hasFocus() )
|
||||
{
|
||||
vx = Group3Spin->SpinBox_DX->GetValue();
|
||||
vy = newValue;
|
||||
vz = Group3Spin->SpinBox_DZ->GetValue();
|
||||
}
|
||||
else if ( Group3Spin->SpinBox_DZ->hasFocus() )
|
||||
{
|
||||
vx = Group3Spin->SpinBox_DX->GetValue();
|
||||
vy = Group3Spin->SpinBox_DY->GetValue();
|
||||
vz = newValue;
|
||||
}
|
||||
else if ( Group4Spin->SpinBox_DX->hasFocus() )
|
||||
{
|
||||
vx = newValue;
|
||||
vy = Group4Spin->SpinBox_DY->GetValue();
|
||||
vz = Group4Spin->SpinBox_DZ->GetValue();
|
||||
vs = Group4Spin->SpinBox_DS->GetValue();
|
||||
}
|
||||
else if ( Group4Spin->SpinBox_DY->hasFocus() )
|
||||
{
|
||||
vx = Group4Spin->SpinBox_DX->GetValue();
|
||||
vy = newValue;
|
||||
vz = Group4Spin->SpinBox_DZ->GetValue();
|
||||
vs = Group4Spin->SpinBox_DS->GetValue();
|
||||
}
|
||||
else if ( Group4Spin->SpinBox_DZ->hasFocus() )
|
||||
{
|
||||
vx = Group4Spin->SpinBox_DX->GetValue();
|
||||
vy = Group4Spin->SpinBox_DY->GetValue();
|
||||
vz = newValue;
|
||||
vs = Group4Spin->SpinBox_DS->GetValue();
|
||||
}
|
||||
else if ( Group4Spin->SpinBox_DS->hasFocus() )
|
||||
{
|
||||
vx = Group4Spin->SpinBox_DX->GetValue();
|
||||
vy = Group4Spin->SpinBox_DY->GetValue();
|
||||
vz = Group4Spin->SpinBox_DZ->GetValue();
|
||||
vs = newValue;
|
||||
}
|
||||
|
||||
if ( myConstructorId == 0 )
|
||||
{ // SEGMENT
|
||||
|
Loading…
x
Reference in New Issue
Block a user