Commit Graph

340 Commits

Author SHA1 Message Date
Abdullah Tahiri
6278aedcdc Bug fix: Add System-wide Macro dir to python path
=================================================

Self explanatory, so that macros in system-wide location can import modules therein.
2016-01-11 19:25:18 +01:00
Abdullah Tahiri
2c884ab5f5 Gui Enhancement: Support for macros in AppUserHome/Macro
=====================================================

What?
It was suggested that the macros should be moved to AppUserHome/Macro
http://forum.freecadweb.org/viewtopic.php?f=10&t=13433

Solution:
The solution is backwards compatible in the sense that if you have a running
configuration, updating should not change anything.

For new installations the macro directory will default to AppUserHome/Macro. However
this would break all the installation scripts (probably also ME's plugin manager).

Conflicts:
	src/Mod/Path/Gui/AppPathGuiPy.cpp
2016-01-11 19:24:22 +01:00
wmayer
7ee54c10aa + PrintError is not part of FreeCAD but FreeCAD.Console 2016-01-09 21:21:17 +01:00
Eivind Kvedalen
c2d5b0ad91 Issue #2389: ObjectIdentifiers constructed from a property sometimes do not
resolve correctly, because the resolver may fail if a different document
objects has a Label equal to the property's document object's identifier.
2016-01-08 23:09:00 +01:00
Eivind Kvedalen
fd9ceeae43 ObjectIdentifier: Resolve document name on both identifier and Label. 2016-01-08 23:09:00 +01:00
Eivind Kvedalen
34d9d86925 ObjectIdentifier::resolve() should set documentName to internal name, not the Label property. 2016-01-08 23:09:00 +01:00
Eivind Kvedalen
495b23209c Document/PropertyExpressionEngine: Added onDocumentRestored function, to update internals of PropertyExpressionEngine after loading a document from disk. 2016-01-08 23:08:55 +01:00
Eivind Kvedalen
b6d5c668b0 App: Added template<class P> class AtomicPropertyChangeInterface. 2016-01-08 23:08:39 +01:00
wmayer
a83e09d6e2 + expose onDocumentRestored to Python feature classes 2016-01-05 19:05:48 +01:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
0695552cff QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:06:48 +01:00
wmayer
750897c20e + introduce proper enum for property status to replace plain integers 2016-01-01 15:36:24 +01:00
wmayer
ee0698af9a + add template class to add feature types with dynamic properties but without extended Python binding 2015-12-31 15:34:24 +01:00
wmayer
e1b8c515c4 + add overloaded addObject() method to Document class to add existing DocumentObject 2015-12-31 15:32:47 +01:00
wmayer
991394dc76 + improve exception handling in initialization scripts 2015-12-29 23:42:29 +01:00
wmayer
1dfc3ed4e8 + handle exceptions when restoring dynamic properties 2015-12-21 18:24:12 +01:00
Eivind Kvedalen
72bb18a53f PropertyExpressionEngine/DocumentObject: Track object deletes and update dependencies accordingly. 2015-12-21 14:11:13 +01:00
Eivind Kvedalen
9d1c1ba0e1 PropertyExpressionEngine::slotObjectRenamed(...): return immediately if the property's owner is not part of an object (e.g on the undo stack). 2015-12-21 14:11:13 +01:00
Eivind Kvedalen
48de598f82 PropertyExpressionEngine::slotObjectRenamed(...): only change the object if it is absolutely necessary,
or else the object will in most cases be touched, leading to unnecessary recomputes.
2015-12-21 14:11:12 +01:00
Eivind Kvedalen
ca0c9de886 Expression/ObjectIdentifier: changed return type of renameDocumentObject and renameDocument,
to be able to signal that a rename actually took place.
2015-12-21 14:11:12 +01:00
Eivind Kvedalen
58727037ef DocumentObject: Don't emit signal if Label hasn't actually changed. 2015-12-21 14:11:11 +01:00
wmayer
d8f9fc8f74 + make method cancelObservation() not pure virtual 2015-12-19 11:31:59 +01:00
Eivind Kvedalen
d012bdba3a NumberExpression: Added std::setprecision to keep precision of number in double to string conversion. 2015-12-18 22:05:32 +01:00
Eivind Kvedalen
af9d9be117 PropertyPlacement: Fixed setting of angle (missing deg to radian conversion). 2015-12-18 22:05:31 +01:00
Eivind Kvedalen
b087991559 ObjectIdentifier: Added std::setprecision to keep precision of double to string conversion. 2015-12-18 22:05:31 +01:00
DeepSOIC
1ed75e64de API: improve built-in docu for copyObject and moveObject 2015-12-16 20:45:54 +03:00
DeepSOIC
cd7ef29cda API: fix document.copyObject not working when with dependencies
copyObject failed with an error when attempting to copy an object with
dependencies from one document to another.

http://forum.freecadweb.org/viewtopic.php?f=22&t=13533&p=108288#p108288
2015-12-16 20:45:53 +03:00
wmayer
6855e775b2 + implement PropertyExpressionEngine::getPyObject 2015-12-13 22:40:07 +01:00
Timothy Hobbs
0fe51d5d2a Application.cpp English editing
Edit English in comments and warning messages
2015-12-12 01:22:14 +01:00
Stefan Tröger
2c249e69f2 Expressions: Fix property editor behavior
- change responsibility of python code emition
- Correct python code handling for expressions
- handle constraints expressions handling
2015-12-09 14:08:50 +01:00
Stefan Tröger
96a586d04a Expressions: Integrate into the property editor
- basic infrastructure for handling of expressions
- port the unit properties editor to support expressions
- port placement editor to support expressions
- expressions for double spinbox
- expressions in sketch constraints
2015-12-09 14:08:48 +01:00
wmayer
f462c5f91e + fix crash when undoing creation of spreadsheet 2015-12-09 13:18:58 +01:00
Eivind Kvedalen
4a861c75d5 App: Replaced freecad_dynamic_cast by static_cast. In this case we know the type, and don't check for 0. 2015-12-09 12:15:14 +01:00
Eivind Kvedalen
5fa6bc714e App: Removed VariableExpression::setName(), and replace call by setPath(); it's use caused a crash (#2352). 2015-12-09 12:15:12 +01:00
wmayer
61ceaf3316 + Add export macro to Enumeration class 2015-11-21 22:46:42 +01:00
wmayer
dec2a2f6cd + fix inconsistencies in using DynamicProperty class 2015-11-17 12:22:07 +01:00
wmayer
0ec8dd48b1 + property editor handles case when dynamic property is removed 2015-11-16 15:24:36 +01:00
wmayer
0cddf520d0 + make isReadOnly & isHidden of PropertyContainer non-virtual 2015-11-14 02:07:57 +01:00
wmayer
9862e50083 + allow to set u/v dirs for B-Spline fit 2015-11-06 16:43:58 +01:00
wmayer
effd32b640 + fix build failure on Linux 2015-11-06 14:56:19 +01:00
wmayer
e5a99461f5 + add helper classes to store names of doument and object and not a pointer 2015-11-06 14:28:03 +01:00
wmayer
ea252c7426 + implement mechanism to allow only a single application instance 2015-11-05 15:56:50 +01:00
wmayer
2180f02f1c + fix comment, convert native separators to UNIX separators 2015-10-25 14:16:38 +01:00
Przemo Firszt
cf4e7167d7 App: Fix typo in description of PropertyFloatConstraint
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-10-25 12:46:18 +01:00
wmayer
35edaa7e5a + support of Python feature classes without an execute() method
+ if execute() method of Python feature is missing or if it returns false call the execute() method of the C++ feature
+ fix SketchObjectPython
2015-10-21 00:22:40 +02:00
wmayer
f46dc20fca + fix & suppress msvc warnings 2015-10-16 18:26:30 +02:00
wmayer
24815ac196 + remove Py_TPFLAGS_BASETYPE flag for all generated Python bindings because they can't be sub-classed in Python 2015-10-12 19:59:58 +02:00
wmayer
4295301957 + fixes #0001368: Subclassing Matrix silently fails 2015-10-12 18:29:00 +02:00
wmayer
f6023d36d2 + rework BoundingBox class and its Python binding 2015-10-11 00:18:53 +02:00
wmayer
5f5817b033 + Prefer prefix ++/-- operators for non-primitive types 2015-10-07 14:29:49 +02:00