SHA256
1
0
forked from pool/FreeCAD
Dominique Leuenberger 2018-09-07 13:40:29 +00:00 committed by Git OBS Bridge
commit 6d436cc88e
10 changed files with 111 additions and 568 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a53986ef6a197396e3fca6558fe162027ee2b71354594d0874ea6b7af72e6b54
size 385254415

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:15bf621edb984b0914fd7e5c1ce2e2469b3f031fbb4d2bd1f86c90f634e0829b
size 385050127

11
FreeCAD-test.changes Normal file
View File

@ -0,0 +1,11 @@
-------------------------------------------------------------------
Wed Sep 5 14:50:23 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Use noun phrase in summary.
-------------------------------------------------------------------
Tue Aug 28 17:10:43 UTC 2018 - Adrian Schröter <adrian@suse.de>
- initial package of test package. Just for running the test suite
of installed FreeCAD rpm, so no binary rpm gets build on purpose.

35
FreeCAD-test.spec Normal file
View File

@ -0,0 +1,35 @@
#
# spec file for package FreeCAD-test
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: FreeCAD-test
Version: 0.17.1534399137.9948ee4f1
Release: 0
Summary: Meta source package that runs the FreeCAD testsuite when built
License: LGPL-2.0-or-later AND GPL-2.0-or-later
Group: Productivity/Graphics/CAD
Url: http://www.freecadweb.org/
BuildRequires: FreeCAD
%description
This is just executing the test suite at build time.
%build
export LC_ALL="C.utf-8"
FreeCAD --console --run-test 0 || exit 1
%changelog

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Sep 5 14:50:23 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Use noun phrase in summary.
-------------------------------------------------------------------
Tue Aug 28 11:56:17 UTC 2018 - Adrian Schröter <adrian@suse.de>
- fix missing dependency to numpy, found via the..
- added testsuite run via extra spec file
-------------------------------------------------------------------
Sat Aug 11 12:29:12 UTC 2018 - adrian@suse.de
- update branch again
- fix dependencies of Qt4 build (Leap 42.3)
-------------------------------------------------------------------
Thu Jul 26 07:42:15 UTC 2018 - adrian@suse.de
- update to current branch, obsoletes branch_update.patch
-------------------------------------------------------------------
Mon Jun 18 19:36:22 UTC 2018 - stefan.bruens@rwth-aachen.de

View File

@ -1,5 +1,5 @@
name: FreeCAD
version: 0.17
mtime: 1523004517
commit: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7
version: 0.17.1534399137.9948ee4f1
mtime: 1534399137
commit: 9948ee4f1570df9216862a79705afb367b2c6ffb

View File

@ -19,7 +19,7 @@
%define x_prefix %{_libdir}/%{name}
Name: FreeCAD
Version: 0.17
Version: 0.17.1534399137.9948ee4f1
Release: 0
Summary: General Purpose 3D CAD Modeler
License: LGPL-2.0-or-later AND GPL-2.0-or-later
@ -29,7 +29,6 @@ Source0: %{name}-%version.tar.xz
Source1: FreeCAD.sh
Source2: FreeCADCmd.sh
Source3: FreeCAD_shared_mimeinfo
Patch0: branch_update.patch
# python3 and generic compile fixes
Patch1: fix-build.diff
# support for openmpi2 suse package
@ -42,6 +41,8 @@ BuildRequires: Coin-devel
#BuildRequires: SoQt-devel
#BuildRequires: libmed-devel # needed for FEM module, but requires older hdf5 lib
# we use upstream OpenCASCADE instead of oce atm
#BuildRequires: hdf5-1_8-devel
#BuildRequires: hdf5-1_8-openmpi-devel
BuildRequires: occt-devel
BuildRequires: vtk-devel
BuildRequires: vtk-java
@ -72,10 +73,6 @@ BuildRequires: git
BuildRequires: libXerces-c-devel
BuildRequires: pkg-config
# reported to break FreeCAD here
# https://forum.freecadweb.org/viewtopic.php?t=24610
Conflicts: python-pivy
%if 0%{?suse_version} >= 1330
# Qt5 & python3
BuildRequires: openmpi2-devel
@ -92,12 +89,16 @@ BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5UiTools)
BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
Requires: python3-numpy
Requires: python3-pyside2
# For Arch & Draft workbench
Requires: python3-pivy
# core dump if PySide is installed
Conflicts: python3-pyside
Conflicts: python-pyside
# reported to break FreeCAD here
# https://forum.freecadweb.org/viewtopic.php?t=24610
Conflicts: python-pivy
%else
BuildRequires: libshiboken-devel
BuildRequires: python-CXX-devel
@ -106,6 +107,8 @@ BuildRequires: python-matplotlib
BuildRequires: python-pyside-devel
BuildRequires: python-pyside-tools
BuildRequires: pkgconfig(QtWebKit)
Requires: python-numpy
Requires: python-pyside
%if 0%{?suse_version} > 0
# Qt4 & python2
BuildRequires: libqt4-devel

View File

@ -2,8 +2,8 @@
<service name="obs_scm" mode="disabled">
<param name="url">https://github.com/FreeCAD/FreeCAD.git</param>
<param name="scm">git</param>
<param name="revision">0.17</param>
<param name="version">0.17</param>
<param name="revision">releases/FreeCAD-0-17</param>
<param name="versionprefix">0.17</param>
</service>
<service name="set_version" mode="disabled"/>

View File

@ -1,554 +0,0 @@
diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp
index 6f6fb6cba..471c07428 100644
--- a/src/App/Expression.cpp
+++ b/src/App/Expression.cpp
@@ -897,16 +897,13 @@ Expression * FunctionExpression::evalAggregate() const
throw Exception("Invalid property type for aggregate");
} while (range.next());
}
- else if (args[i]->isDerivedFrom(App::VariableExpression::getClassTypeId())) {
+ else {
std::unique_ptr<Expression> e(args[i]->eval());
NumberExpression * n(freecad_dynamic_cast<NumberExpression>(e.get()));
if (n)
c->collect(n->getQuantity());
}
- else if (args[i]->isDerivedFrom(App::NumberExpression::getClassTypeId())) {
- c->collect(static_cast<NumberExpression*>(args[i])->getQuantity());
- }
}
return new NumberExpression(owner, c->getQuantity());
diff --git a/src/App/FeaturePython.cpp b/src/App/FeaturePython.cpp
index 0a90b43a0..9d04fecad 100644
--- a/src/App/FeaturePython.cpp
+++ b/src/App/FeaturePython.cpp
@@ -108,17 +108,21 @@ void FeaturePythonImp::onBeforeChange(const Property* prop)
if (feature.hasAttr("__object__")) {
Py::Callable method(feature.getAttr(std::string("onBeforeChange")));
Py::Tuple args(1);
- std::string prop_name = object->getPropertyName(prop);
- args.setItem(0, Py::String(prop_name));
- method.apply(args);
+ const char* prop_name = object->getPropertyName(prop);
+ if (prop_name) {
+ args.setItem(0, Py::String(prop_name));
+ method.apply(args);
+ }
}
else {
Py::Callable method(feature.getAttr(std::string("onBeforeChange")));
Py::Tuple args(2);
args.setItem(0, Py::Object(object->getPyObject(), true));
- std::string prop_name = object->getPropertyName(prop);
- args.setItem(1, Py::String(prop_name));
- method.apply(args);
+ const char* prop_name = object->getPropertyName(prop);
+ if (prop_name) {
+ args.setItem(1, Py::String(prop_name));
+ method.apply(args);
+ }
}
}
}
@@ -141,17 +145,21 @@ void FeaturePythonImp::onChanged(const Property* prop)
if (feature.hasAttr("__object__")) {
Py::Callable method(feature.getAttr(std::string("onChanged")));
Py::Tuple args(1);
- std::string prop_name = object->getPropertyName(prop);
- args.setItem(0, Py::String(prop_name));
- method.apply(args);
+ const char* prop_name = object->getPropertyName(prop);
+ if (prop_name) {
+ args.setItem(0, Py::String(prop_name));
+ method.apply(args);
+ }
}
else {
Py::Callable method(feature.getAttr(std::string("onChanged")));
Py::Tuple args(2);
args.setItem(0, Py::Object(object->getPyObject(), true));
- std::string prop_name = object->getPropertyName(prop);
- args.setItem(1, Py::String(prop_name));
- method.apply(args);
+ const char* prop_name = object->getPropertyName(prop);
+ if (prop_name) {
+ args.setItem(1, Py::String(prop_name));
+ method.apply(args);
+ }
}
}
}
diff --git a/src/Gui/ViewProviderPythonFeature.cpp b/src/Gui/ViewProviderPythonFeature.cpp
index 927557068..2fe1c4fd1 100644
--- a/src/Gui/ViewProviderPythonFeature.cpp
+++ b/src/Gui/ViewProviderPythonFeature.cpp
@@ -643,17 +643,21 @@ void ViewProviderPythonFeatureImp::onChanged(const App::Property* prop)
if (vp.hasAttr("__object__")) {
Py::Callable method(vp.getAttr(std::string("onChanged")));
Py::Tuple args(1);
- std::string prop_name = object->getPropertyName(prop);
- args.setItem(0, Py::String(prop_name));
- method.apply(args);
+ const char* prop_name = object->getPropertyName(prop);
+ if (prop_name) {
+ args.setItem(0, Py::String(prop_name));
+ method.apply(args);
+ }
}
else {
Py::Callable method(vp.getAttr(std::string("onChanged")));
Py::Tuple args(2);
args.setItem(0, Py::Object(object->getPyObject(), true));
- std::string prop_name = object->getPropertyName(prop);
- args.setItem(1, Py::String(prop_name));
- method.apply(args);
+ const char* prop_name = object->getPropertyName(prop);
+ if (prop_name) {
+ args.setItem(1, Py::String(prop_name));
+ method.apply(args);
+ }
}
}
}
diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py
index 1a442dff2..a0ec64d56 100644
--- a/src/Mod/Arch/ArchStructure.py
+++ b/src/Mod/Arch/ArchStructure.py
@@ -152,7 +152,7 @@ class _CommandStructure:
st = Draft.getObjectsOfType(sel,"Structure")
ax = Draft.getObjectsOfType(sel,"Axis")
if ax:
- FreeCAD.ActiveDocument.openTransaction(str(translate("Arch","Create Structural System")))
+ FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Structural System"))
FreeCADGui.addModule("Arch")
if st:
FreeCADGui.doCommand("obj = Arch.makeStructuralSystem(" + ArchCommands.getStringList(st) + "," + ArchCommands.getStringList(ax) + ")")
@@ -164,7 +164,7 @@ class _CommandStructure:
FreeCAD.ActiveDocument.recompute()
return
elif not(ax) and not(st):
- FreeCAD.ActiveDocument.openTransaction(str(translate("Arch","Create Structure")))
+ FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Structure"))
FreeCADGui.addModule("Arch")
for obj in sel:
FreeCADGui.doCommand("obj = Arch.makeStructure(FreeCAD.ActiveDocument." + obj.Name + ")")
@@ -194,7 +194,7 @@ class _CommandStructure:
self.tracker.finalize()
if point == None:
return
- FreeCAD.ActiveDocument.openTransaction(str(translate("Arch","Create Structure")))
+ FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Structure"))
FreeCADGui.addModule("Arch")
if self.Profile is not None:
if "Precast" in self.Profile:
diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp
index b83092d9e..6c20eb94c 100644
--- a/src/Mod/Import/Gui/AppImportGuiPy.cpp
+++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp
@@ -541,7 +541,12 @@ private:
// the App Code.
std::vector< std::vector<App::Color> > Colors;
get_parts_colors(hierarchical_part,FreeLabels,part_id,Colors);
- ocaf.reallocateFreeShape(hierarchical_part,FreeLabels,part_id,Colors);
+ ocaf.reallocateFreeShape(hierarchical_part,FreeLabels,part_id,Colors);
+
+#if OCC_VERSION_HEX >= 0x070200
+ // Update is not performed automatically anymore: https://tracker.dev.opencascade.org/view.php?id=28055
+ XCAFDoc_DocumentTool::ShapeTool(hDoc->Main())->UpdateAssemblies();
+#endif
Base::FileInfo file(Utf8Name.c_str());
if (file.hasExtension("stp") || file.hasExtension("step")) {
diff --git a/src/Mod/Mesh/App/MeshPy.xml b/src/Mod/Mesh/App/MeshPy.xml
index c71944df6..76bc4618a 100644
--- a/src/Mod/Mesh/App/MeshPy.xml
+++ b/src/Mod/Mesh/App/MeshPy.xml
@@ -520,7 +520,7 @@ for p in mesh.Facets:
</Attribute>
<ClassDeclarations>private:
friend class PropertyMeshKernel;
- class PropertyMeshKernel* parentProperty;
+ class PropertyMeshKernel* parentProperty = nullptr;
</ClassDeclarations>
</PythonExport>
</GenerateModel>
diff --git a/src/Mod/PartDesign/App/DatumPoint.cpp b/src/Mod/PartDesign/App/DatumPoint.cpp
index 297d56276..5a65f09a6 100644
--- a/src/Mod/PartDesign/App/DatumPoint.cpp
+++ b/src/Mod/PartDesign/App/DatumPoint.cpp
@@ -99,12 +99,12 @@ void Point::onChanged(const App::Property* prop)
Superclass::onChanged(prop);
}
-void Point::Restore(Base::XMLReader& r)
+void Point::onDocumentRestored()
{
- Superclass::Restore(r);
//fix for #0002758 Datum point moves to (0,0,0) when reopening the file.
//recreate shape, as the restored one has old Placement burned into it.
this->makeShape();
+ Superclass::onDocumentRestored();
}
void Point::makeShape()
@@ -114,7 +114,9 @@ void Point::makeShape()
BRepBuilderAPI_MakeVertex builder(gp_Pnt(0,0,0));
if (!builder.IsDone())
return;
- Shape.setValue(builder.Shape());
+ Part::TopoShape tshape(builder.Shape());
+ tshape.setPlacement(this->Placement.getValue());
+ Shape.setValue(tshape);
}
Base::Vector3d Point::getPoint()
diff --git a/src/Mod/PartDesign/App/DatumPoint.h b/src/Mod/PartDesign/App/DatumPoint.h
index 19dfdbeb4..e00cf6434 100644
--- a/src/Mod/PartDesign/App/DatumPoint.h
+++ b/src/Mod/PartDesign/App/DatumPoint.h
@@ -50,9 +50,11 @@ public:
protected:
virtual void onChanged(const App::Property* prop);
- virtual void Restore(Base::XMLReader& r);
+ virtual void onDocumentRestored() override;
+
private:
void makeShape();
+
};
} //namespace PartDesign
diff --git a/src/Mod/Path/PathScripts/post/grbl_post.py b/src/Mod/Path/PathScripts/post/grbl_post.py
index 536c2cf54..9ad099243 100644
--- a/src/Mod/Path/PathScripts/post/grbl_post.py
+++ b/src/Mod/Path/PathScripts/post/grbl_post.py
@@ -261,7 +261,7 @@ def parse(pathobj):
if param in c.Parameters:
if param == 'F':
if command not in RAPID_MOVES:
- outstring.append(param + format(c.Parameters['F'], '.2f'))
+ outstring.append(param + format(c.Parameters['F'] * 60, '.2f'))
elif param == 'T':
outstring.append(param + str(c.Parameters['T']))
else:
diff --git a/src/Mod/Path/libarea/CMakeLists.txt b/src/Mod/Path/libarea/CMakeLists.txt
index ef95c29d3..087c911dd 100644
--- a/src/Mod/Path/libarea/CMakeLists.txt
+++ b/src/Mod/Path/libarea/CMakeLists.txt
@@ -16,13 +16,17 @@ OPTION(USE_BOOST_PYTHON "use BOOST_PYTHON, otherwise use PYBIND11" ON)
if(USE_BOOST_PYTHON)
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
- if(NOT PYTHON_VERSION_MAJOR LESS 3)
- find_package( Boost COMPONENTS python3)
- if (NOT Boost_PYTHON3_FOUND)
+ # boost-python >= 1.67 on some platforms has suffix
+ set(BOOST_PY_SUFFIX ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
+
+ find_package( Boost COMPONENTS python${BOOST_PY_SUFFIX} )
+ if (NOT Boost_PYTHON${BOOST_PY_SUFFIX}_FOUND)
+ # try just the major version
+ find_package( Boost COMPONENTS python${PYTHON_VERSION_MAJOR} )
+ if (NOT Boost_PYTHON${PYTHON_VERSION_MAJOR}_FOUND)
+ # unversioned
find_package( Boost COMPONENTS python REQUIRED)
endif()
- else()
- find_package( Boost COMPONENTS python REQUIRED) # find BOOST and boost-python
endif()
if(Boost_FOUND)
diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp
index 83c6c6007..3d9709603 100644
--- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp
+++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp
@@ -4867,7 +4867,7 @@ CmdSketcherCreatePeriodicBSpline::CmdSketcherCreatePeriodicBSpline()
void CmdSketcherCreatePeriodicBSpline::activated(int iMsg)
{
Q_UNUSED(iMsg);
- ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerEllipse(1) );
+ ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerBSpline(1) );
}
bool CmdSketcherCreatePeriodicBSpline::isActive(void)
diff --git a/src/Mod/Spreadsheet/TestSpreadsheet.py b/src/Mod/Spreadsheet/TestSpreadsheet.py
index 56a0acf92..19ed6be8d 100644
--- a/src/Mod/Spreadsheet/TestSpreadsheet.py
+++ b/src/Mod/Spreadsheet/TestSpreadsheet.py
@@ -851,6 +851,16 @@ class SpreadsheetCases(unittest.TestCase):
self.assertEqual(sheet.getContents('B1'), '=A1 == 1 ? 11 : (A1 == 2 ? 12 : 13)')
self.assertEqual(sheet.getContents('C1'), '=A1 == 1 ? (A1 == 2 ? 12 : 13) : 11')
+ def testIssue3432(self):
+ """ Regression test for issue 3432; numbers with units are ignored from aggregates"""
+ sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet')
+ sheet.set('A1', '1mm')
+ sheet.set('B1', '2mm')
+ sheet.set('C1', '=max(A1:B1;3mm)')
+ self.doc.recompute()
+ self.assertEqual(sheet.get('C1'), Units.Quantity('3 mm'))
+
+
def tearDown(self):
#closing doc
FreeCAD.closeDocument(self.doc.Name)
diff --git a/src/Mod/TechDraw/Gui/Command.cpp b/src/Mod/TechDraw/Gui/Command.cpp
index 02f0103d2..de4f5ff8e 100644
--- a/src/Mod/TechDraw/Gui/Command.cpp
+++ b/src/Mod/TechDraw/Gui/Command.cpp
@@ -78,6 +78,16 @@
using namespace TechDrawGui;
using namespace std;
+bool isArchSection(App::DocumentObject* obj)
+{
+ bool result = true;
+ App::Property* prop1 = obj->getPropertyByName("Objects");
+ App::Property* prop2 = obj->getPropertyByName("OnlySolids");
+ if ( (!prop1) || (!prop2) ) {
+ result = false;
+ }
+ return result;
+}
//===========================================================================
// TechDraw_NewPageDef (default template)
@@ -92,7 +102,7 @@ CmdTechDrawNewPageDef::CmdTechDrawNewPageDef()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert new default drawing page");
sToolTipText = QT_TR_NOOP("Insert new default drawing page");
- sWhatsThis = "TechDraw_NewPageDef";
+ sWhatsThis = "TechDraw_New_Default";
sStatusTip = sToolTipText;
sPixmap = "actions/techdraw-new-default";
}
@@ -162,7 +172,7 @@ CmdTechDrawNewPage::CmdTechDrawNewPage()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert new drawing page from template");
sToolTipText = QT_TR_NOOP("Insert new drawing page from template");
- sWhatsThis = "TechDraw_NewPage";
+ sWhatsThis = "TechDraw_New_Pick";
sStatusTip = sToolTipText;
sPixmap = "actions/techdraw-new-pick";
}
@@ -302,7 +312,7 @@ CmdTechDrawNewViewSection::CmdTechDrawNewViewSection()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert section view in drawing");
sToolTipText = QT_TR_NOOP("Insert a new Section View of a Part in the active drawing");
- sWhatsThis = "TechDraw_NewViewSecton";
+ sWhatsThis = "TechDraw_NewSection";
sStatusTip = sToolTipText;
sPixmap = "actions/techdraw-viewsection";
}
@@ -371,7 +381,7 @@ CmdTechDrawNewViewDetail::CmdTechDrawNewViewDetail()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert detail view in drawing");
sToolTipText = QT_TR_NOOP("Insert a new Detail View of a Part in the active drawing");
- sWhatsThis = "TechDraw_NewViewDetail";
+ sWhatsThis = "TechDraw_NewProjGroup";
sStatusTip = sToolTipText;
sPixmap = "actions/techdraw-viewdetail";
}
@@ -562,7 +572,7 @@ CmdTechDrawAnnotation::CmdTechDrawAnnotation()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("&Annotation");
sToolTipText = QT_TR_NOOP("Inserts an Annotation in the active drawing");
- sWhatsThis = "TechDraw_Annotation";
+ sWhatsThis = "TechDraw_NewAnnotation";
sStatusTip = QT_TR_NOOP("Inserts an Annotation in the active drawing");
sPixmap = "actions/techdraw-annotation";
}
@@ -855,7 +865,7 @@ CmdTechDrawDraftView::CmdTechDrawDraftView()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a DraftView");
sToolTipText = QT_TR_NOOP("Inserts a Draft WB object into the active drawing");
- sWhatsThis = "TechDraw_DraftView";
+ sWhatsThis = "TechDraw_NewDraft";
sStatusTip = QT_TR_NOOP("Inserts a Draft WB object into the active drawing");
sPixmap = "actions/techdraw-draft-view";
}
@@ -869,6 +879,7 @@ void CmdTechDrawDraftView::activated(int iMsg)
}
//TODO: shouldn't this be checking for a Draft object only?
+// there is no obvious way of check for a Draft object. Could be App::FeaturePython, Part::Part2DObject, ???
std::vector<App::DocumentObject*> objects = getSelection().getObjectsOfType(App::DocumentObject::getClassTypeId());
if (objects.empty()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
@@ -894,7 +905,6 @@ bool CmdTechDrawDraftView::isActive(void)
return DrawGuiUtil::needPage(this);
}
-//TODO: shouldn't this be checking for an Arch object only?
//===========================================================================
// TechDraw_ArchView
//===========================================================================
@@ -908,7 +918,7 @@ CmdTechDrawArchView::CmdTechDrawArchView()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert an ArchView");
sToolTipText = QT_TR_NOOP("Inserts a view of an Arch Section Plane into the active drawing");
- sWhatsThis = "TechDraw_ArchView";
+ sWhatsThis = "TechDraw_NewArch";
sStatusTip = QT_TR_NOOP("Inserts a view of an Arch Section Plane into the active drawing");
sPixmap = "actions/techdraw-arch-view";
}
@@ -922,23 +932,33 @@ void CmdTechDrawArchView::activated(int iMsg)
}
std::vector<App::DocumentObject*> objects = getSelection().getObjectsOfType(App::DocumentObject::getClassTypeId());
- if (objects.size() != 1) {
+ if (objects.empty()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
- QObject::tr("Select exactly one Arch Section Plane object."));
+ QObject::tr("Select at least one object."));
return;
}
- App::Property* prop1 = objects[0]->getPropertyByName("Objects");
- App::Property* prop2 = objects[0]->getPropertyByName("OnlySolids");
- if ( (!prop1) || (!prop2) ) {
+ int ifound = 0;
+ bool found = false;
+ for (auto& obj: objects) {
+ if (isArchSection(obj)) {
+ found = true;
+ break;
+ }
+ ifound++;
+ }
+ App::DocumentObject* archObj;
+ if (found) {
+ archObj = objects[ifound];
+ } else {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
- QObject::tr("The selected object is not an Arch Section Plane."));
+ QObject::tr("There is no Arch Section Plane in selection."));
return;
}
std::string PageName = page->getNameInDocument();
std::string FeatName = getUniqueObjectName("ArchView");
- std::string SourceName = objects[0]->getNameInDocument();
+ std::string SourceName = archObj->getNameInDocument();
openCommand("Create ArchView");
doCommand(Doc,"App.activeDocument().addObject('TechDraw::DrawViewArch','%s')",FeatName.c_str());
doCommand(Doc,"App.activeDocument().%s.Source = App.activeDocument().%s",FeatName.c_str(),SourceName.c_str());
@@ -1024,7 +1044,7 @@ CmdTechDrawExportPage::CmdTechDrawExportPage()
sGroup = QT_TR_NOOP("File");
sMenuText = QT_TR_NOOP("&Export page...");
sToolTipText = QT_TR_NOOP("Export a page to an SVG file");
- sWhatsThis = "TechDraw_ExportPage";
+ sWhatsThis = "TechDraw_SaveSVG";
sStatusTip = QT_TR_NOOP("Export a page to an SVG file");
sPixmap = "actions/techdraw-saveSVG";
}
diff --git a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp
index f5324cc3b..5fa0b0bf9 100644
--- a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp
+++ b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp
@@ -236,7 +236,7 @@ CmdTechDrawNewRadiusDimension::CmdTechDrawNewRadiusDimension()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a new radius dimension into the drawing");
sToolTipText = QT_TR_NOOP("Insert a new radius dimension feature for the selected view");
- sWhatsThis = "TechDraw_NewRadiusDimension";
+ sWhatsThis = "TechDraw_Dimension_Radius";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Dimension_Radius";
}
@@ -323,7 +323,7 @@ CmdTechDrawNewDiameterDimension::CmdTechDrawNewDiameterDimension()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a new diameter dimension into the drawing");
sToolTipText = QT_TR_NOOP("Insert a new diameter dimension feature for the selected view");
- sWhatsThis = "TechDraw_NewDiameterDimension";
+ sWhatsThis = "TechDraw_Dimension_Diameter";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Dimension_Diameter";
}
@@ -410,7 +410,7 @@ CmdTechDrawNewLengthDimension::CmdTechDrawNewLengthDimension()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a new length dimension into the drawing");
sToolTipText = QT_TR_NOOP("Insert a new length dimension");
- sWhatsThis = "TechDraw_NewLengthDimension";
+ sWhatsThis = "TechDraw_Dimension_Length";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Dimension_Length";
}
@@ -518,7 +518,7 @@ CmdTechDrawNewDistanceXDimension::CmdTechDrawNewDistanceXDimension()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a new horizontal dimension into the drawing");
sToolTipText = QT_TR_NOOP("Insert a new horizontal-distance dimension");
- sWhatsThis = "TechDraw_NewDistanceXDimension";
+ sWhatsThis = "TechDraw_Dimension_Horizontal";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Dimension_Horizontal";
}
@@ -626,7 +626,7 @@ CmdTechDrawNewDistanceYDimension::CmdTechDrawNewDistanceYDimension()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a new vertical dimension into the drawing");
sToolTipText = QT_TR_NOOP("Insert a new vertical distance dimension");
- sWhatsThis = "TechDraw_NewDistanceYDimension";
+ sWhatsThis = "TechDraw_Dimension_Vertical";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Dimension_Vertical";
}
@@ -733,7 +733,7 @@ CmdTechDrawNewAngleDimension::CmdTechDrawNewAngleDimension()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a new angle dimension into the drawing");
sToolTipText = QT_TR_NOOP("Insert a new angle dimension");
- sWhatsThis = "TechDraw_NewAngleDimension";
+ sWhatsThis = "TechDraw_Dimension_Angle";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Dimension_Angle";
}
@@ -822,7 +822,7 @@ CmdTechDrawLinkDimension::CmdTechDrawLinkDimension()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Link a dimension to 3D geometry");
sToolTipText = QT_TR_NOOP("Link a dimension to 3D geometry");
- sWhatsThis = "TechDraw_LinkDimension";
+ sWhatsThis = "TechDraw_Dimension_Link";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Dimension_Link";
}
diff --git a/src/Mod/TechDraw/Gui/CommandDecorate.cpp b/src/Mod/TechDraw/Gui/CommandDecorate.cpp
index 9edf97d00..b6cb5dab0 100644
--- a/src/Mod/TechDraw/Gui/CommandDecorate.cpp
+++ b/src/Mod/TechDraw/Gui/CommandDecorate.cpp
@@ -80,7 +80,7 @@ CmdTechDrawNewHatch::CmdTechDrawNewHatch()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Hatch a Face using image file");
sToolTipText = QT_TR_NOOP("Hatch a Face using image file");
- sWhatsThis = "TechDraw_NewHatch";
+ sWhatsThis = "TechDraw_Hatch";
sStatusTip = sToolTipText;
sPixmap = "actions/techdraw-hatch";
}
@@ -142,7 +142,7 @@ CmdTechDrawNewGeomHatch::CmdTechDrawNewGeomHatch()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Apply geometric hatch to a Face");
sToolTipText = QT_TR_NOOP("Apply geometric hatch to a Face");
- sWhatsThis = "TechDraw_NewGeomHatch";
+ sWhatsThis = "TechDraw_GeomHatch";
sStatusTip = sToolTipText;
sPixmap = "actions/techdraw-geomhatch";
}
@@ -264,7 +264,7 @@ CmdTechDrawToggleFrame::CmdTechDrawToggleFrame()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Turn View Frames on or off");
sToolTipText = QT_TR_NOOP("Turn View Frames on or off");
- sWhatsThis = "TechDraw_ToggleFrame";
+ sWhatsThis = "TechDraw_Toggle";
sStatusTip = sToolTipText;
sPixmap = "actions/techdraw-toggleframe";
}
@@ -311,7 +311,7 @@ CmdTechDrawRedrawPage::CmdTechDrawRedrawPage()
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Redraw a page");
sToolTipText = QT_TR_NOOP("Redraw a page");
- sWhatsThis = "TechDraw_RedrawPage";
+ sWhatsThis = "TechDraw_Redraw";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_Tree_Page_Sync";
}

View File

@ -34,3 +34,29 @@ index 3b66ec663..3d4bc8afd 100644
#include <IntAna_IntConicQuad.hxx>
#include <IntAna_Quadric.hxx>
#include <gp_Lin.hxx>
diff --git a/src/Mod/Test/TestApp.py b/src/Mod/Test/TestApp.py
index e4b5c8d44..211a4c95a 100644
--- a/src/Mod/Test/TestApp.py
+++ b/src/Mod/Test/TestApp.py
@@ -66,8 +66,7 @@ def All():
"Menu" ]
# add the module tests
- tests += [ "TestFem",
- "MeshTestsApp",
+ tests += [ "MeshTestsApp",
"TestSketcherApp",
"TestPartApp",
"TestPartDesignApp",
diff --git a/src/Mod/Test/TestGui.py b/src/Mod/Test/TestGui.py
index ae5712bfc..7fbc2760c 100644
--- a/src/Mod/Test/TestGui.py
+++ b/src/Mod/Test/TestGui.py
@@ -47,7 +47,6 @@ class TestCmd:
QtUnitGui.addTest("Document")
QtUnitGui.addTest("UnicodeTests")
QtUnitGui.addTest("MeshTestsApp")
- QtUnitGui.addTest("TestFem")
QtUnitGui.addTest("TestSketcherApp")
QtUnitGui.addTest("TestPartApp")
QtUnitGui.addTest("TestPartDesignApp")