Commit Graph

1306 Commits

Author SHA1 Message Date
Yorik van Havre
ae84229ebc App: Added warning at startup if user mods are found in older location 2021-11-26 16:01:23 +01:00
wmayer
3be18613e4 App: remove code to copy user config from old to new location 2021-11-24 19:11:34 +01:00
wmayer
9b59baaacf App: add CMAKE_BINARY_DIR to search paths 2021-11-23 20:13:02 +01:00
wmayer
1c6b7cca9d App: save version number of the most important libraries 2021-11-23 12:55:49 +01:00
Zheng, Lei
32e3eaa01b App: fix subname encoding when saving property links 2021-11-21 23:35:40 -06:00
Zheng, Lei
61ec1192f3 App: change PropertyContainer::Restore()
Changes the way PropertyContainer handles existing property while
restoring. Previously it will first ask DynamicProperty to restore
if possible, then fallback to static property if else.

This patch looks up existing property first, and only fallback to
DynamicProperty if not found. This handles situation when an object
changes an originally dynamic property into a static one. With the
original code, it will add an auto renamed dynamic property that no
one knows its existence.
2021-11-21 19:03:53 -06:00
Zheng, Lei
55d64d71c2 App: do not auto rename new dynamic property
Instead, throw exception in case of duplicate name. Use boolean
parameter 'Preferences/Document/AutoNameDynamicProperty' to get back
the old behavior.
2021-11-21 19:03:53 -06:00
luz paz
bd210c9ee0 App: remove superfluous whitespace in ObjectIdentifier.h 2021-11-20 14:03:40 +01:00
luz paz
05c5e0a6d9 App: fix doc typo in ObjectIdentifier.h 2021-11-20 14:03:40 +01:00
wmayer
15ce4955b3 MingGW: [skip ci] fix build failure 2021-11-17 17:14:27 +01:00
wmayer
387661360c App: standard path handling
* distinguish between temp and cache location
* document's transident directory is created in the cache location
* add functions to access temp and cache location via Python
2021-11-15 16:26:25 +01:00
wmayer
d6b17b2dbb App: add PropertyLinkSubList::addValue() to extend the list 2021-11-15 13:05:19 +01:00
wmayer
744290467d App: add PropertyLinkSubList::verifyObject() to reduce code duplication 2021-11-15 08:42:32 +01:00
Chris Hennes
32790d1351 App: Add colCount and rowCount to Range 2021-11-14 20:45:09 -06:00
Chris Hennes
2ecd720de8 App: Add missing use for boost placeholders 2021-11-14 20:45:09 -06:00
Chris Hennes
7687582d53 App: fix compilation of PropertyStandard.cpp during cherry-pick 2021-11-14 20:45:09 -06:00
Zheng, Lei
fdae470c1b 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
7e272d00f8 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
26ba872aa6 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
796b4c0b2d App: fix crash on copy of Enumeration 2021-11-14 20:45:09 -06:00
wmayer
fde9663c24 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
8dc4c857f0 App: add upgrade() method to PropertyLinkSubList 2021-11-12 07:49:44 +01:00
wmayer
873d79d3b5 App: [skip ci] add program option --keep-deprecated-paths to keep old path names 2021-11-11 14:04:40 +01:00
wmayer
e32f841264 App: fix issue 0002956 2021-11-11 13:51:14 +01:00
wmayer
0b75d53676 App: code cleanup 2021-11-10 18:33:26 +01:00
wmayer
68be996d57 App: add a CMake test to check if C runtime provides backtrace symbols 2021-11-09 14:16:12 +01:00
wmayer
c83ada98d6 App: add new config key UserConfigPath to store the path to the config files 2021-11-09 13:46:26 +01:00
wmayer
55afa21ba1 App: issue 0002956: implement XDG_CACHE_HOME 2021-11-09 00:20:55 +01:00
wmayer
a9b7506007 App: further code refactoring in Application::ExtractUserPath() 2021-11-08 22:17:06 +01:00
wmayer
b32b908eae 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
dbd3e8784a App: code refactoring in Application::ExtractUserPath() 2021-11-08 16:17:08 +01:00
wmayer
ae0198ea0a 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
2ffd911111 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
f36126770c 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
c349e78f45 Minor code change according to suggestions 2021-10-30 12:30:45 +08:00
Zheng, Lei
ba4c992eaa App: use enum in API Application::getDocumentByPath() 2021-10-30 11:03:55 +08:00
Zheng, Lei
ad9ad30c00 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
c74d2b8dd5 App: add class PropertyRotation 2021-10-29 12:40:32 +02:00
wmayer
cd1bd71141 App: [skip ci] add get() method to WeakPtrT class 2021-10-21 15:50:07 +02:00
Yorik van Havre
13b8b05a9a Merge pull request #4787 from chennes/addThemeSupport
[GUI] Add Preference Pack support
2021-10-14 12:41:06 +02:00
Zheng, Lei
9933d4fbce App: add signalChanged to Property
For more efficient tracking of single property changes
2021-10-12 15:47:50 -05:00
Zheng, Lei
864f6d96a6 App: add expression built-in function str()
...for stringify
2021-10-12 13:42:10 -05:00
wmayer
9eedb17b70 App: use consistent spelling of SubElement 2021-10-06 18:09:53 +02:00
wmayer
bcaa8d1c00 App: [skip ci] make Matrix a dynamic attribute of ComplexGeoDataPy 2021-10-05 19:18:12 +02:00
wmayer
df0c7b7818 App: expose methods of ComplexGeoData to Python 2021-10-05 12:43:28 +02:00
wmayer
1bb8b29e28 App: [skip ci] add overloaded constructor of DocumentObjectT 2021-10-02 07:05:37 +02:00
wmayer
a261249217 App: replace ctime() with boost's date/time functions in Application::logStatus() 2021-09-30 19:50:19 +02:00
wmayer
77b09a97f8 App: correctly handle UTF-8 encoded path names under Windows 2021-09-29 13:47:29 +02:00
Ajinkya Dahale
92b3a5430a [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
cc53377985 Merge branch 'master' into addThemeSupport 2021-09-24 07:51:04 -05:00