0000665: Follow up 0000640: This file crashes FreeCAD UI latest Git

This commit is contained in:
wmayer
2012-10-01 13:58:40 +02:00
parent f9e9284db8
commit bc4a3b0c76
9 changed files with 33 additions and 24 deletions

View File

@@ -778,7 +778,7 @@ void ManualAlignment::continueAlignment()
grp.addToViewer(myViewer->getViewer(0));
grp.setAlignable(true);
Gui::getMainWindow()->statusBar()->showMessage(tr("Please pick points in the left and right view"));
Gui::getMainWindow()->showMessage(tr("Please pick points in the left and right view"));
myViewer->getViewer(0)->setEditingCursor(QCursor(Qt::PointingHandCursor));
myViewer->getViewer(1)->setEditingCursor(QCursor(Qt::PointingHandCursor));
@@ -838,7 +838,7 @@ void ManualAlignment::finish()
closeViewer();
reset();
Gui::getMainWindow()->statusBar()->showMessage(tr("The alignment has finished"));
Gui::getMainWindow()->showMessage(tr("The alignment has finished"));
// If an event receiver has been defined send the manual alignment finished event to it
emitFinished();
@@ -856,7 +856,7 @@ void ManualAlignment::cancel()
myTransform = Base::Placement();
reset();
Gui::getMainWindow()->statusBar()->showMessage(tr("The alignment has been canceled"));
Gui::getMainWindow()->showMessage(tr("The alignment has been canceled"));
// If an event receiver has been defined send the manual alignment cancelled event to it
emitCanceled();
@@ -888,7 +888,7 @@ void ManualAlignment::align()
myAlignModel.activeGroup().removeFromViewer(myViewer->getViewer(0));
myAlignModel.activeGroup().setAlignable(false);
std::vector<App::DocumentObject*> pViews = myAlignModel.activeGroup().getViews();
Gui::getMainWindow()->statusBar()->showMessage(tr("Try to align group of views"));
Gui::getMainWindow()->showMessage(tr("Try to align group of views"));
// Compute alignment
bool ok = computeAlignment(myAlignModel.activeGroup().getPoints(), myFixedGroup.getPoints());
@@ -928,17 +928,17 @@ void ManualAlignment::showInstructions()
{
// Now we can start the actual alignment
if (myAlignModel.activeGroup().countPoints() < myPickPoints) {
Gui::getMainWindow()->statusBar()->showMessage(
Gui::getMainWindow()->showMessage(
tr("Too few points picked in the left view."
" At least %1 points are needed.").arg(myPickPoints));
}
else if (myFixedGroup.countPoints() < myPickPoints) {
Gui::getMainWindow()->statusBar()->showMessage(
Gui::getMainWindow()->showMessage(
tr("Too few points picked in the right view."
" At least %1 points are needed.").arg(myPickPoints));
}
else if (myAlignModel.activeGroup().countPoints() != myFixedGroup.countPoints()) {
Gui::getMainWindow()->statusBar()->showMessage(
Gui::getMainWindow()->showMessage(
tr("Different number of points picked in left and right view. "
"On the left view %1 points are picked, "
"on the right view %2 points are picked.")
@@ -1146,13 +1146,13 @@ void ManualAlignment::probePickedCallback(void * ud, SoEventCallback * n)
self->applyPickedProbe(that, point);
const SbVec3f& vec = point->getPoint();
Gui::getMainWindow()->statusBar()->showMessage(
Gui::getMainWindow()->showMessage(
tr("Point picked at (%1,%2,%3)")
.arg(vec[0]).arg(vec[1]).arg(vec[2]));
}
}
else {
Gui::getMainWindow()->statusBar()->showMessage(
Gui::getMainWindow()->showMessage(
tr("No point was picked"));
}
}