+ set focus on spin box for pocket, revolve and fillet task panel

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5217 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer 2011-12-04 16:15:36 +00:00
parent bdb203bf9c
commit 6ec6ed601e
3 changed files with 5 additions and 8 deletions

View File

@ -67,9 +67,7 @@ TaskFilletParameters::TaskFilletParameters(ViewProviderFillet *FilletView,QWidge
ui->doubleSpinBox->setMaximum(INT_MAX); ui->doubleSpinBox->setMaximum(INT_MAX);
ui->doubleSpinBox->setValue(r); ui->doubleSpinBox->setValue(r);
ui->doubleSpinBox->selectAll(); ui->doubleSpinBox->selectAll();
QMetaObject::invokeMethod(ui->doubleSpinBox, "setFocus", Qt::QueuedConnection);
setFocus ();
} }
void TaskFilletParameters::onLengthChanged(double len) void TaskFilletParameters::onLengthChanged(double len)

View File

@ -67,6 +67,7 @@ TaskPocketParameters::TaskPocketParameters(ViewProviderPocket *PocketView,QWidge
ui->doubleSpinBox->setMaximum(INT_MAX); ui->doubleSpinBox->setMaximum(INT_MAX);
ui->doubleSpinBox->setValue(l); ui->doubleSpinBox->setValue(l);
ui->doubleSpinBox->selectAll(); ui->doubleSpinBox->selectAll();
QMetaObject::invokeMethod(ui->doubleSpinBox, "setFocus", Qt::QueuedConnection);
//// check if the sketch has support //// check if the sketch has support
//Sketcher::SketchObject *pcSketch; //Sketcher::SketchObject *pcSketch;
@ -78,8 +79,6 @@ TaskPocketParameters::TaskPocketParameters(ViewProviderPocket *PocketView,QWidge
// else // else
// ui->checkBoxReversed->setChecked(reversed); // ui->checkBoxReversed->setChecked(reversed);
//} //}
setFocus ();
} }
void TaskPocketParameters::onLengthChanged(double len) void TaskPocketParameters::onLengthChanged(double len)

View File

@ -68,12 +68,12 @@ TaskRevolutionParameters::TaskRevolutionParameters(ViewProviderRevolution *Revol
Base::Vector3f Ax = pcRevolution->Axis.getValue(); Base::Vector3f Ax = pcRevolution->Axis.getValue();
ui->doubleSpinBox->setValue(l); ui->doubleSpinBox->setValue(l);
if(Ax.y > 0) ui->doubleSpinBox->selectAll();
QMetaObject::invokeMethod(ui->doubleSpinBox, "setFocus", Qt::QueuedConnection);
if (Ax.y > 0)
ui->axis->setCurrentIndex(0); ui->axis->setCurrentIndex(0);
else else
ui->axis->setCurrentIndex(1); ui->axis->setCurrentIndex(1);
setFocus ();
} }
void TaskRevolutionParameters::onAngleChanged(double len) void TaskRevolutionParameters::onAngleChanged(double len)