Miscellaneous fixes

This commit is contained in:
jrheinlaender 2013-05-16 18:09:42 +04:30 committed by Stefan Tröger
parent 934c68faa5
commit c751eefc00
4 changed files with 11 additions and 2 deletions

View File

@ -1049,6 +1049,12 @@ void makeChamferOrFillet(Gui::Command* cmd, const std::string& which)
Part::Feature *base = static_cast<Part::Feature*>(selection[0].getObject()); Part::Feature *base = static_cast<Part::Feature*>(selection[0].getObject());
if (base != pcActiveBody->getPrevSolidFeature(NULL, true)) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong base feature"),
QObject::tr("Only the current Tip of the active Body can be selected as the base feature"));
return;
}
const Part::TopoShape& TopShape = base->Shape.getShape(); const Part::TopoShape& TopShape = base->Shape.getShape();
if (TopShape._Shape.IsNull()){ if (TopShape._Shape.IsNull()){
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
@ -1244,7 +1250,7 @@ void CmdPartDesignDraft::activated(int iMsg)
Part::Feature *base = static_cast<Part::Feature*>(selection[0].getObject()); Part::Feature *base = static_cast<Part::Feature*>(selection[0].getObject());
if (base != pcActiveBody->Tip.getValue()) { if (base != pcActiveBody->getPrevSolidFeature(NULL, true)) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong base feature"), QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong base feature"),
QObject::tr("Only the current Tip of the active Body can be selected as the base feature")); QObject::tr("Only the current Tip of the active Body can be selected as the base feature"));
return; return;

View File

@ -32,6 +32,7 @@
#include "TaskLinearPatternParameters.h" #include "TaskLinearPatternParameters.h"
#include "TaskMultiTransformParameters.h" #include "TaskMultiTransformParameters.h"
#include "Workbench.h" #include "Workbench.h"
#include "ReferenceSelection.h"
#include <Base/UnitsApi.h> #include <Base/UnitsApi.h>
#include <App/Application.h> #include <App/Application.h>
#include <App/Document.h> #include <App/Document.h>

View File

@ -31,6 +31,7 @@
#include "TaskMirroredParameters.h" #include "TaskMirroredParameters.h"
#include "TaskMultiTransformParameters.h" #include "TaskMultiTransformParameters.h"
#include "Workbench.h" #include "Workbench.h"
#include "ReferenceSelection.h"
#include <App/Application.h> #include <App/Application.h>
#include <App/Document.h> #include <App/Document.h>
#include <Gui/Application.h> #include <Gui/Application.h>
@ -366,7 +367,7 @@ bool TaskDlgMirroredParameters::accept()
std::vector<std::string> mirrorPlanes; std::vector<std::string> mirrorPlanes;
App::DocumentObject* obj; App::DocumentObject* obj;
mirrorParameter->getMirrorPlane(obj, mirrorPlanes); mirrorParameter->getMirrorPlane(obj, mirrorPlanes);
std::string mirrorPlane = mirrorParameter->getPythonStr(obj, mirrorPlanes); std::string mirrorPlane = getPythonStr(obj, mirrorPlanes);
if (!mirrorPlane.empty()) { if (!mirrorPlane.empty()) {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.MirrorPlane = %s", name.c_str(), mirrorPlane.c_str()); Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.MirrorPlane = %s", name.c_str(), mirrorPlane.c_str());
} else } else

View File

@ -32,6 +32,7 @@
#include "TaskPolarPatternParameters.h" #include "TaskPolarPatternParameters.h"
#include "TaskMultiTransformParameters.h" #include "TaskMultiTransformParameters.h"
#include "Workbench.h" #include "Workbench.h"
#include "ReferenceSelection.h"
#include <Base/UnitsApi.h> #include <Base/UnitsApi.h>
#include <App/Application.h> #include <App/Application.h>
#include <App/Document.h> #include <App/Document.h>