Commit Graph

17778 Commits

Author SHA1 Message Date
Zheng, Lei
62423cb79a TechDraw: fix projection group editing update 2019-08-17 15:32:51 +02:00
Zheng, Lei
f243db0d5b TechDraw: fix drawing update on undo/redo 2019-08-17 15:32:51 +02:00
Zheng, Lei
d0ca893b3e Command: disable auto transaction if triggering editing
Each command will create an App::AutoTransaction to auto create and
commit a transaction for proper undo/redo. But if the command starts
editing, the current transaction may be required to out live the current
command.

Note that the command can only detect editing if the code calls
Gui::Document::setEdit(). There are objects that starts editing by
calling its own ViewProvider::setEdit(), e.g. various TechDraw
ViewProviders. In this case, to avoid auto committing, one can call
App::Application::setActiveTransaction() with the second argument set to
true, or call App::AutoTransaction::setEnable(false).
2019-08-17 15:32:51 +02:00
Zheng, Lei
78ce18ace4 TreeView: update status on manual object touch 2019-08-17 15:32:51 +02:00
Zheng, Lei
d4f066f4e9 TreeView: fix selection sync problem 2019-08-17 15:32:50 +02:00
Zheng, Lei
4ba326fae0 Draft: fix for python2 2019-08-17 15:32:50 +02:00
Zheng, Lei
a228f3c11b App: fix xml indentation in PropertyContainer::Save 2019-08-17 15:32:50 +02:00
Zheng, Lei
75f974b1a1 Gui: fix selection change handling in PropertyView 2019-08-17 15:32:50 +02:00
Zheng, Lei
5a96db6483 App: fix property type matching in transaction 2019-08-17 15:32:50 +02:00
Zheng, Lei
e047b8764c TreeView: fix potential crash on deleting object 2019-08-17 15:32:50 +02:00
Zheng, Lei
61df79ab9f Gui::Document: fix saving of camera setting 2019-08-17 15:32:50 +02:00
Zheng, Lei
0d77bcdd88 TreeView: fix bug in selection sync 2019-08-17 15:32:50 +02:00
Zheng, Lei
05433f7148 Gui: fix crash on editing PropertyLinkList 2019-08-17 15:32:50 +02:00
Zheng, Lei
022e6c6fb2 Sketcher: auto undo when canceling constraint editing 2019-08-17 15:32:50 +02:00
Zheng, Lei
2cb69603b6 Gui: fix auto view switching of editing object 2019-08-17 15:32:50 +02:00
Zheng, Lei
f78f05adee Sketcher: fix external editing 2019-08-17 15:32:50 +02:00
Zheng, Lei
9e3a981d37 Base: fix duplicated exception message
Because the exception can propagate across C++ and Python boundary
multiple times, prepending extra information may cause duplication,
something like,

"FreeCAD exception thrown(FreeCAD exception thrown(..."
2019-08-17 15:32:49 +02:00
Zheng, Lei
d3500ecfab App: fix Python object leak in PropertyListT
* Fix Python object leak in _setPyObject()
* Add support for Python iterables
* Minor performance improvement on setPyValues()
2019-08-17 15:32:49 +02:00
Zheng, Lei
3fcb3e677a PropertyContainer: skip saving trasient dynamic property 2019-08-17 15:32:49 +02:00
Zheng, Lei
ce30645b39 Fix typos pathes -> paths 2019-08-17 15:32:49 +02:00
luz.paz
4aba7e2f5a Fix more typos 2019-08-17 15:32:49 +02:00
luz.paz
ef2947dce6 Fix extra grammar issue in src/App 2019-08-17 15:32:49 +02:00
luz.paz
039d6eac01 Fix typos in various src/Mod directories 2019-08-17 15:32:49 +02:00
luz.paz
0f67e8ddfa Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
luz.paz
5b74dc8b0d Fix typos in src/Base 2019-08-17 15:32:49 +02:00
luz.paz
8825c95727 Fix typos in src/App 2019-08-17 15:32:48 +02:00
Zheng, Lei
088c282e2e PropertyEditor: fix bug when constructing context menu 2019-08-17 15:32:48 +02:00
Zheng, Lei
673d035bb3 PropertyContainerPy: modified getPropertyByName()
Add 'checkOwner' argument to allow caller distinguish linked property
2019-08-17 15:32:48 +02:00
Zheng, Lei
aaf0f2c80d Link: rename _LinkRecomputed to _LinkTouched 2019-08-17 15:32:48 +02:00
Zheng, Lei
c0d0150786 ViewProviderLink: fix visual of linked object with scale 2019-08-17 15:32:48 +02:00
Zheng, Lei
a738c7fafa TreeView: fix missing update on item expansion 2019-08-17 15:32:48 +02:00
Zheng, Lei
26dad093f6 ExpressionCompleter: fix missing init() call 2019-08-17 15:32:48 +02:00
Zheng, Lei
e0799e2bb3 Expression: fix python object evaluation 2019-08-17 15:32:48 +02:00
Zheng, Lei
9b3351399b App::Document: fix file extension case sensitive problem 2019-08-17 15:32:48 +02:00
Zheng, Lei
9223f08b48 Fix build for older gcc 2019-08-17 15:32:48 +02:00
Zheng, Lei
1d274f6697 Test cases changes
Slight adjustment of various test cases due to various API changes.
2019-08-17 15:32:48 +02:00
Zheng, Lei
de66e563e0 Draft/Arch related changes
* Add Draft_LinkArray and Draft_PathLinkArray that uses link for both
  data and visualization, which supports linking external objects

* Add link group support for draft snap

* Fix ArchWindows expression ambiguity
2019-08-17 15:32:47 +02:00
Zheng, Lei
d93259e238 Path changes
* Relaxed valid base shape requirement, as long as it can return a
  shape using part.getShape()

* Improve ViewProviderPath performance by sharing the same selection
  observer

* Relocate libarea binary installation
2019-08-17 15:15:48 +02:00
Zheng, Lei
435815ccc8 Fem: minor changes 2019-08-17 15:15:47 +02:00
Zheng, Lei
11a93a0578 PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
Zheng, Lei
e911b69769 Spreadsheet changes
Various changes to support in-place editing, and more.
2019-08-17 15:15:47 +02:00
Zheng, Lei
32ad54c9ef Import: add new implementation of STEP importer/exporter
For better supporting Link and groups. The original implementation can
still be used by uncheck the STEP import setting 'Use Link Group'.
2019-08-17 15:15:47 +02:00
Zheng, Lei
d26f772035 TechDraw: Link related changes
* Support link and group objects

* Support view sync by implementing view provider API getMDIView()

* Use handleChangedPropertyType() for object migration instead of
  reimplementing Restore() because of a lots of changes in
  PropertyContainer::Restore().

* Various other small fixes.
2019-08-17 15:15:46 +02:00
Zheng, Lei
6da72b9859 Part: changes to Part Module
* Added Part::Feature::getTopoShape/getShape() function that can obtain
  shape from any object with proper implementation of getSubObject(). It
  can even construct compound from group object with proper implementation
  of getSubObjects().

* Modified ViewProviderExt to work on any object, because it now obtain
  the shape using Part::Feature::getShape()

* Modified various Part features to obtain base/tool shapes using
  Part::getShape(), which allows them to be any type of object,
  including Link and groups.

* Modified various Part command to relax type requirement on selected
  objects.

* Add support of link and group to dimension, and add dimension refresh
  command

* Support link and group in simple command command, and add a few more
  copy command variations.

* Add special handling of 'Shape' attribute in PropertyContainerPy and
  use Part::Feature::getShape() to return shape for any object without
  Shape property. This allows many python feature work with any object
  without modification.

* GeometrySurface/CurvePy, add convenience attribute 'Rotation'

* TopoShapePy:

    * Extended support of sub shape attribute, e.g. Compound1, Solid2,
      SubShape3 ('SubShape' is used to access child shape of a compound)

    * makeWires(), new API to sort and return wires given a list of edges.

    * transformed/translated/rotated/scaled(), return a new shape with
      some transformation.

    * findPlane(), find the plane of a planar shape

    * isCoplanar(), check if two shape are coplanar
2019-08-17 15:08:35 +02:00
Zheng, Lei
d833e19e01 App/Gui: Changes to application Python init script
* Better module import error handling

* Allow co-installation of Python2 and Python3 version of FreeCAD

* Add FreeCAD.Logger class for convenient logging in Python. See class
  document for more details.
2019-08-17 15:08:34 +02:00
Zheng, Lei
9634c19990 Gui: add some icons 2019-08-17 15:08:34 +02:00
Zheng, Lei
51ab8caace Gui: improve deletion handling in origin feature 2019-08-17 15:08:34 +02:00
Zheng, Lei
bc26820837 Gui: Placement/DatumCS view provider changes
* Add always zoom invariant and always on top rendering to
  ViewProviderDatumCS

* Add a new utility class AxisOrigin for more efficient axis rendering.
  Also exposed to python.

* Change ViewProviderPlacement to use AxisOrigin for rendering.
  A single instance of AxisOrigin is shared by all
  ViewProviderPlacement. Selection context is used to distinguish among
  different instances.
2019-08-17 15:08:34 +02:00
Zheng, Lei
a9b866caa5 Gui: ActiveObjectList API changes
Support sub-object in ActiveObjectList. This means that it can now
distinguish the same object being activated under different parent,
which may be in a different document through external linking.
2019-08-17 15:08:34 +02:00
Zheng, Lei
08f0511b1f Python feature/observer related changes
* Add new API and signal handler in document observer

* Pre initialize python handler function to improve performance. In
  case Python code use dynamic patching, i.e. add class method at
  runtime (which is rare and should be discouraged), the python feature
  can be re-initialized by simply assign proeprty Proxy again.

* Add property tracking in DocumentObjectT

* WidgetFactory adds support for accepting python QIcon, which is used
  by ViewProviderPythonFeature
2019-08-17 15:08:34 +02:00