Sketcher: Driving/reference creation improvements and some other fixes

======================================================================

- Changing from Driving to reference does not include unnecessary solvings.
- Added some checks to avoid making Driving constraints when calling directly from python and involving only external geometry (would give redundant constraints).
- New python command toggleDriving to just change the status from reference to Driving
- New UI toolbar Command to toggle constraints
- Fix to allow switching from/to construction mode during continuous mode creation.
- Enable/Disable for constraints in constraints widget has changed to operate on multiselection and now effects "toggle" instead of enable/disable.
- Disable the option to directly create a SnellsLaw non-driving constraint (this constraint does not support direct creation, it can be toggled to non-driving after creation though).
This commit is contained in:
Abdullah Tahiri
2015-05-26 14:37:22 +02:00
committed by wmayer
parent bb00ed2142
commit 4a052bebb5
9 changed files with 180 additions and 52 deletions

View File

@@ -5350,7 +5350,16 @@ void CmdSketcherGeometryCreationMode::activated(int iMsg)
bool CmdSketcherGeometryCreationMode::isActive(void)
{
return isCreateGeoActive(getActiveGuiDocument());
Gui::Document * doc=getActiveGuiDocument();
if (doc) {
// checks if a Sketch Viewprovider is in Edit and is in no special mode
if (doc->getInEdit() && doc->getInEdit()->isDerivedFrom
(SketcherGui::ViewProviderSketch::getClassTypeId())) {
return true;
}
}
return false;
}
void CreateSketcherCommandsCreateGeo(void)