Fix critical warnings

This commit is contained in:
wmayer
2012-06-13 18:49:10 +02:00
parent 7cb404f62f
commit 8a94ba885c
19 changed files with 204 additions and 199 deletions

View File

@@ -178,7 +178,7 @@ App::DocumentObjectExecReturn *Pocket::execute(void)
it_near = it;
upToFace = (std::string(Type.getValueAsString()) == "UpToLast" ? it_far->face : it_near->face);
} else {
if (FaceName.getValue() == "")
if (FaceName.isEmpty())
return new App::DocumentObjectExecReturn("Cannot extrude up to face: No face selected");
// Get active object, this is the object that the user referenced when he clicked on the face!

View File

@@ -92,7 +92,7 @@ TaskPadParameters::TaskPadParameters(ViewProviderPad *PadView,QWidget *parent)
// According to bug #0000521 the reversed option
// shouldn't be de-activated if the pad has a support face
ui->checkBoxReversed->setChecked(reversed);
ui->lineFaceName->setText(upToFace == "" ? tr("No face selected") : tr(upToFace));
ui->lineFaceName->setText(pcPad->FaceName.isEmpty() ? tr("No face selected") : tr(upToFace));
ui->changeMode->clear();
ui->changeMode->insertItem(0, tr("Dimension"));
ui->changeMode->insertItem(1, tr("To last"));

View File

@@ -86,7 +86,7 @@ TaskPocketParameters::TaskPocketParameters(ViewProviderPocket *PocketView,QWidge
ui->lineFaceName->setEnabled(false);
} else if (index == 4) { // Only this option requires to select a face
ui->doubleSpinBox->setEnabled(false);
ui->lineFaceName->setText(upToFace == "" ? tr("No face selected") : tr(upToFace));
ui->lineFaceName->setText(pcPocket->FaceName.isEmpty() ? tr("No face selected") : tr(upToFace));
} else { // Neither value nor face required
ui->doubleSpinBox->setEnabled(false);
ui->lineFaceName->setEnabled(false);