Commit Graph

1295 Commits

Author SHA1 Message Date
wmayer
0469e277ab App: add PropertyLinkSubList::addValue() to extend the list 2021-11-15 13:05:19 +01:00
wmayer
1929b4ca4a App: add PropertyLinkSubList::verifyObject() to reduce code duplication 2021-11-15 08:42:32 +01:00
Chris Hennes
465548dc18 App: Add colCount and rowCount to Range 2021-11-14 20:45:09 -06:00
Chris Hennes
d5009f2946 App: Add missing use for boost placeholders 2021-11-14 20:45:09 -06:00
Chris Hennes
1f43b3f933 App: fix compilation of PropertyStandard.cpp during cherry-pick 2021-11-14 20:45:09 -06:00
Zheng, Lei
14dfae0597 App: add hiddenref() expression built-in function
Any object reference inside this function is treated as hidden to
exclude it from dependency calculation. This function allows some form
of cyclic depdenency.

Merger note: renamed from "HREF" to "HIDDENREF" to avoid confusion with
the standard "hypertext reference" use of HREF.
2021-11-14 20:45:09 -06:00
Zheng, Lei
8cf3cf330b App/Gui: allow change dynamic property group and documentation
Exposed as PropertyContainerPy.setGroup/DocumentationOfProperty.

Added a menu action to property view for rename dynamic property group.
2021-11-14 20:45:09 -06:00
Zheng, Lei
72ae26dfee App/Gui: improve expression binding of PropertyEnumeration
The enumeration items are exposed through sub path '.Enum'. When
'ShowAll' is enabled in property view, this sub path is exposed as a
sub property item named 'Enum', and can be either manually edited or
bound with an expression.
2021-11-14 20:45:09 -06:00
Zheng, Lei
3cc2b49ee9 App: fix crash on copy of Enumeration 2021-11-14 20:45:09 -06:00
wmayer
6da7749233 App: do not raise an exception if application data directory doesn't exist because this breaks the CI tests
Instead try to create the directories and throw an exception if this fails.
2021-11-12 10:17:35 +01:00
wmayer
b2475b228a App: add upgrade() method to PropertyLinkSubList 2021-11-12 07:49:44 +01:00
wmayer
a545fb6741 App: [skip ci] add program option --keep-deprecated-paths to keep old path names 2021-11-11 14:04:40 +01:00
wmayer
e7e2994ba0 App: fix issue 0002956 2021-11-11 13:51:14 +01:00
wmayer
d86a73f07e App: code cleanup 2021-11-10 18:33:26 +01:00
wmayer
84182deff0 App: add a CMake test to check if C runtime provides backtrace symbols 2021-11-09 14:16:12 +01:00
wmayer
5ad8bed9c4 App: add new config key UserConfigPath to store the path to the config files 2021-11-09 13:46:26 +01:00
wmayer
2cc5707571 App: issue 0002956: implement XDG_CACHE_HOME 2021-11-09 00:20:55 +01:00
wmayer
d244df4f79 App: further code refactoring in Application::ExtractUserPath() 2021-11-08 22:17:06 +01:00
wmayer
7375be66ad App: keep custom user data path as is if FREECAD_USER_HOME or FREECAD_USER_DATA is set 2021-11-08 18:28:02 +01:00
wmayer
ab1220b663 App: code refactoring in Application::ExtractUserPath() 2021-11-08 16:17:08 +01:00
wmayer
11c5954ebf App: split Application::ParseOptions into two functions
to simplify handling of options that should be processed before determining user directories
2021-11-08 11:10:13 +01:00
luz paz
fdcdaebc9b Fix typos in source comments [skip ci]
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ontop,orgin,orginx,orginy,ot,pard,parms,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu`
2021-11-05 02:35:17 +01:00
wmayer
09da245af9 App: harmonize API of App::Application
* make getHomePath() static and return a std::string
* make getExecutableName() static and return a std::string
2021-11-04 10:50:09 +01:00
Zheng, Lei
a2fb4a5d6d Minor code change according to suggestions 2021-10-30 12:30:45 +08:00
Zheng, Lei
9885dadfff App: use enum in API Application::getDocumentByPath() 2021-10-30 11:03:55 +08:00
Zheng, Lei
fc9d3547ad App: fix external document loading
The problem happens when partial loading is enabled. If document A
contains a link to some object in document B, it will load B as partial
document with only that object and its necessary dependencies. But if
document A contains another link to some object in document C which also
has a link to some object in document B, the link in document C may not
be restored, because document B is partially loaded without the linked
object. This patch will check for this case and reload document B for
more objects.

See an example reported in
https://forum.freecadweb.org/viewtopic.php?p=495078#p495078
2021-10-30 11:03:52 +08:00
wmayer
16ae568549 App: add class PropertyRotation 2021-10-29 12:40:32 +02:00
wmayer
b24ac5f2f8 App: [skip ci] add get() method to WeakPtrT class 2021-10-21 15:50:07 +02:00
Yorik van Havre
d95f085760 Merge pull request #4787 from chennes/addThemeSupport
[GUI] Add Preference Pack support
2021-10-14 12:41:06 +02:00
Zheng, Lei
413a822a07 App: add signalChanged to Property
For more efficient tracking of single property changes
2021-10-12 15:47:50 -05:00
Zheng, Lei
2c6f621721 App: add expression built-in function str()
...for stringify
2021-10-12 13:42:10 -05:00
wmayer
7b45d63bf2 App: use consistent spelling of SubElement 2021-10-06 18:09:53 +02:00
wmayer
b6d90bf575 App: [skip ci] make Matrix a dynamic attribute of ComplexGeoDataPy 2021-10-05 19:18:12 +02:00
wmayer
32592de8ce App: expose methods of ComplexGeoData to Python 2021-10-05 12:43:28 +02:00
wmayer
a6d93e2d5e App: [skip ci] add overloaded constructor of DocumentObjectT 2021-10-02 07:05:37 +02:00
wmayer
0c62c22554 App: replace ctime() with boost's date/time functions in Application::logStatus() 2021-09-30 19:50:19 +02:00
wmayer
ca05fc678b App: correctly handle UTF-8 encoded path names under Windows 2021-09-29 13:47:29 +02:00
Ajinkya Dahale
b7ea205c70 [App] Fix regression introduced by PR #4996
Files opened by running `freecad xxxx.FCStd` or similar relative paths could not
be saved because of new code introduced to create parent directories. See
https://github.com/FreeCAD/FreeCAD/pull/4996#issuecomment-922370077 and
https://forum.freecadweb.org/viewtopic.php?f=13&t=62319&p=534156#p534156.

This commit resolves the issue by ensuring the parent path is absolute while
saving. We would probably like to make sure the file name is itself stored with
absolute path, but there's a few problems
1. There may be other occurences where files are loaded with relative paths. So
having a check here is a good idea.
2. Files opened by `freecad xxxx.FCStd` somehow don't have the issue where
renaming parent directory throws an exception on save. Instead the file is saved
in the new location.
2021-09-29 13:35:02 +02:00
Chris Hennes
b432592fb2 Merge branch 'master' into addThemeSupport 2021-09-24 07:51:04 -05:00
wmayer
52c4ad941b App: add comment for clarification 2021-09-23 18:51:41 +02:00
wmayer
bfe7a7a120 App: make evalExpression() a class method of DocumentObject 2021-09-23 15:31:15 +02:00
Yorik van Havre
b8a4d1e07e Merge pull request #4800 from heewa/abort-save-when-unable-to-finish
App: Abort save when unable to finish
2021-09-20 10:47:57 +02:00
Chris Hennes
6780ded233 [App] Fix LGTM warning decl hides param 2021-09-19 12:31:24 -05:00
wmayer
ef0e303235 App: handle empty, . or .. as parent directory 2021-09-19 18:06:47 +02:00
Chris Hennes
186548da6c [App] LGTM fix - rename loop variable
LGTM complains that the use of "obj" as the loop variable here hides the
parameter "obj". To silence the warning, rename the loop variable.
2021-09-18 23:18:51 -05:00
Preslav
d7ac25e3cf Ammending stiffness units 2021-09-17 11:08:08 +02:00
Ajinkya Dahale
820e88f95b [Core] (Partially?) Fix data loss on dir rename (#4996)
* Fix lost filename in err msg

In some circumstances, FileExceptions are constructed empty, then have a
filename assigned to them, but the error message in these scenarios is
left as the default "unknown" one, which is sometimes shown to users.
This change fixes that case to be consistent with instances that are
constructed with the filename.

The exception can happen when trying to save the file in a location that does
not exist, or when the user does not have permission to write there. If it
comes when saving after closing the document, all previous changes can be lost.

Partially fixes issue #4098.

Co-authored-by: Heewa Barfchin <heewa.b@gmail.com>
2021-09-16 12:06:29 -05:00
wmayer
40d2955c66 Base: split export/import macros from FCConfig.h and move them to FCGlobal.h
The FCGlobal.h can be included in a Global.h header file of an extension module.

The reason is that some IDEs (e.g. QtCreator) fails to detect the export/import macros when only defined in the PreCompiled.h files and thus raise a parser warning.
2021-09-14 16:40:30 +02:00
Chris Hennes
27042d210f Merge branch 'master' into addThemeSupport 2021-08-19 09:51:12 -05:00
0penBrain
f976699bdf [Core] exit() can prevent core dumping, use abort() instead on debug mode 2021-08-18 18:12:31 +02:00