Skip to content

Commit

Permalink
Merge branch 'master' into macosx-macports-enable-finding-qt4
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Molteni committed Aug 22, 2016
2 parents 2f13ff9 + 52b98f9 commit 43cbd6a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/Mod/Part/App/Attacher.cpp
Expand Up @@ -1577,41 +1577,42 @@ AttachEngineLine *AttachEngineLine::copy() const
Base::Placement AttachEngineLine::calculateAttachedPlacement(Base::Placement origPlacement) const
{
eMapMode mmode = this->mapMode;
if (mmode == mmDeactivated)
throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled

//modes that are mirrors of attacher3D:
bool bReUsed = true;
Base::Placement presuperPlacement;
switch(mmode){
case mmDeactivated:
throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled
case mm1AxisX:
mmode = mmObjectYZ;
break;
break;
case mm1AxisY:
mmode = mmObjectXZ;
break;
break;
case mm1AxisZ:
mmode = mmObjectXY;
break;
break;
case mm1AxisCurv:
mmode = mmRevolutionSection;
//the line should go along Y, not Z
presuperPlacement.setRotation(
Base::Rotation( Base::Vector3d(0.0,0.0,1.0),
Base::Vector3d(0.0,1.0,0.0) )
);
break;
break;
case mm1Binormal:
mmode = mmFrenetTN;
break;
break;
case mm1Normal:
mmode = mmFrenetTB;
break;
break;
case mm1Tangent:
mmode = mmNormalToPath;
break;
break;
default:
bReUsed = false;
break;
}

Base::Placement plm;
Expand Down Expand Up @@ -1640,7 +1641,7 @@ Base::Placement AttachEngineLine::calculateAttachedPlacement(Base::Placement ori
switch (mmode) {
case mmDeactivated:
//should have been filtered out already!
break;
break;
case mm1AxisInertia1:
case mm1AxisInertia2:
case mm1AxisInertia3:{
Expand Down Expand Up @@ -1845,12 +1846,12 @@ AttachEnginePoint *AttachEnginePoint::copy() const
Base::Placement AttachEnginePoint::calculateAttachedPlacement(Base::Placement origPlacement) const
{
eMapMode mmode = this->mapMode;
if (mmode == mmDeactivated)
throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled

//modes that are mirrors of attacher3D:
bool bReUsed = true;
switch(mmode){
case mmDeactivated:
throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled
case mm0Origin:
mmode = mmObjectXY;
break;
Expand Down
6 changes: 6 additions & 0 deletions src/Mod/PartDesign/Gui/CommandPrimitive.cpp
Expand Up @@ -63,6 +63,9 @@ void CmdPrimtiveCompAdditive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;

Gui::ActionGroup* pcAction = qobject_cast<Gui::ActionGroup*>(_pcAction);
pcAction->setIcon(pcAction->actions().at(iMsg)->icon());

std::string FeatName;
std::string CSName = getUniqueObjectName("CoordinateSystem");;
if(iMsg == 0) {
Expand Down Expand Up @@ -249,6 +252,9 @@ void CmdPrimtiveCompSubtractive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;

Gui::ActionGroup* pcAction = qobject_cast<Gui::ActionGroup*>(_pcAction);
pcAction->setIcon(pcAction->actions().at(iMsg)->icon());

//check if we already have a feature as subtractive ones work only if we have
//something to subtract from.
App::DocumentObject *prevSolid = pcActiveBody->Tip.getValue();
Expand Down

0 comments on commit 43cbd6a

Please sign in to comment.