Commit Graph

26743 Commits

Author SHA1 Message Date
Zheng, Lei
54c484df9b App: add Property::isSame() API
To compare if two property contains the same content. The default
implementation in Property uses the persistense interface to save both
properties to string and compares the content. This may not work at the
moment if the property saves content in separate file or in binary.

Various properties have cheaper implementation to direct compare their
internal values.
2021-12-21 21:41:02 -07:00
Zheng, Lei
875452c020 Draft: support 'CopyOnChange' in Draft link array 2021-12-21 21:41:02 -07:00
Zheng, Lei
5229f5776f App: support CopyOnChange property in Link
New property status bit 'CopyOnChange' is added for any document object
to publish any property as a 'Configuration' option. When Link is
linked to any object with such property, it will duplicate those
properties and added it Link itself as dynamic properties. If the user
changes any of these dynamic properties, the Link will auto copy the
linked to object and apply the new configuration to it.

The Link has a new property 'LinkCopyOnChange' to allow user to
enable/disable this feature.

Spreadsheet's 'Configuration Table' feature will publish its
configuration property with 'CopyOnChange'.

Currently, once the linked object is copied, it will be independent with
the original object. There is no mechanism to auto sync changes back to
the copy.
2021-12-21 21:41:02 -07:00
Zheng, Lei
b65f24d61d Gui: fix property view linked property highlight 2021-12-21 21:41:02 -07:00
Zheng, Lei
7ebb142b2c Spreadsheet: add menu action 'Configuration table...'
To make it easy for user to create dynamically switchable configuration
tables using spreadsheet.
2021-12-21 21:41:02 -07:00
Zheng, Lei
830bd52af0 Spreadsheet: support mapping protocol in PropertySheetPy
Read only mapping protocol support to retrieve a range of cell values.
Expects the key to be a string of either a single cell address or a
range.
2021-12-21 21:41:02 -07:00
Chris Hennes
a5ca0b7d15 Spreadsheet: Compilation fixes for cherry-picked commits 2021-12-21 21:41:02 -07:00
Zheng, Lei
753d51aedf Spreadsheet: change alias handling
No longer add dynamic property for alias, simply rely on
get(Dynamic)PropertyByName() to check for aliases.

Add new API PropertyContainer::getPropertyNamedList() so that
ExpressionCompleter can discover properties with aliases.
2021-12-21 21:41:02 -07:00
Chris Hennes
d0394ef878 Spreadsheet: Compilation fixes for cherry-picked commits 2021-12-21 21:41:02 -07:00
Zheng, Lei
0c2c334f87 Spreadsheet: support cell binding
Cell binding allows one to bind a range of cells of one sheet to another
range of cells of an arbitary sheet, including any empty cells in the
range.

The binding is implemented with PropertyExpressionEngine and
PropertySheet::setPathValue(), which binds a special path of
PropertySheet, such as

    .cells.Bind.A1.D1

to an expression, such as

     tuple(.cells, <<A2>>, <<A5>>)

The A1 and D1 in the example above specifies the binding start and end
cell address. And <<A2>> and <<A5>> are the range of cells to bind to.
Note that you can use any expression that evalutes to string for the
binding destination, e.g. <<A%d>> % B1, which uses the value inside B1
to construct the binding destination. The '.cells' in the tuple shown
above is an example to bind cells of the same PropertySheet. It can be
change to to reference to any other spreadsheet, even those outside the
current document, e.g. Document#Spreadsheet001.cells
2021-12-21 21:41:02 -07:00
Zheng, Lei
55e2c918a9 Spreadsheet: support paste into cell range
For single range copy, the range selection when pasting determines the
start cell and the number of duplications.

For example, when copying a range A1:B2 (i.e. a 2x2 square) and pasting
into a selection of C1:C5 (i.e. a 5x1 vertical line), the square will be
duplicated once in horizontal, but twice in vertical, resulting new
cells range from C1:D4. This logic is borrowed from google sheet.

For multi-ranged copy, no multi duplication is intended. If more than
one selection range exists before pasting, only the top left cell of
the last selected range is used to determine the starting cell for
pasting. The cells will be copied with the exact cell layout keeping any
empty cells in between. This logic is different from google sheet, where
it disallows unalligned multi-ranged copy, and will condense and
eliminate any empty cells for aligned multi-range copy.
2021-12-21 21:41:02 -07:00
Zheng, Lei
50ab1c558b Gui: handle exception in property item display 2021-12-21 21:41:02 -07:00
Zheng, Lei
10f1ac8436 App: add expression build-in href() for backward compatibility
As deprecated alias for hiddenref()
2021-12-21 21:41:02 -07:00
Uwe
5f3c869ac4 [PD] fix a hole thread issue
- The thread must not be deeper than the hole.
  (One could see that if one used a thread depth dimension and set
  it to the same value than the hole depth, the thread was too deep.)
2021-12-22 02:54:49 +01:00
Uwe
25558880ce [PD] hole dialog improvements
- no keyboard tracking
- don't disable labels since we don't do this for the other dialog labels
- avoid a doubled word in subsequent labels
- further UI file changes are by Qt's Designer
2021-12-22 02:46:07 +01:00
luz paz
f9461f78f3 Base: translate doxygen from DE/FR to EN
For the purpose of making the source documentation uniform, source comments in this file were translated to english.
2021-12-22 01:17:06 +01:00
luz paz
3b2cf4713b Mesh: translate doxygen from DE to EN
For the purpose of making the source documentation uniform, source comments in this file were translated to english.
2021-12-22 01:09:52 +01:00
Uwe
99765c53a8 [PD] fix several hole thread issues
- actually use specified thread depth, fixes issue reported here: https://github.com/FreeCAD/FreeCAD/pull/4274#issuecomment-997787744
- fixes 2 UI enabling issues
- the thread depth cannot be longer than the hole depth
- the hole cannot be deeper than the through-all depth
2021-12-22 01:09:06 +01:00
Chris Hennes
0b0646dfe9 Addon Manager: Fix github macro update code 2021-12-21 17:23:02 -06:00
Chris Hennes
37e18c9a04 Addon Manager: Correct macro installation location 2021-12-21 14:48:35 -06:00
wmayer
6e457c9ea8 Part: handle removal of function HLRBRep_PolyAlgo::Angle in OCC 7.5 2021-12-21 21:26:00 +01:00
wmayer
20f9aa42e7 Part: expose Poly HLR algorithm to Python 2021-12-21 19:45:01 +01:00
Chris Hennes
1842c99cda Addon Manager: Correct proxy default 2021-12-21 11:19:21 -06:00
Yorik van Havre
10ca0ba94b Merge pull request #5243 from paullee0/ArchEquipment_2_SketchArch_UpdateAttachmentObject_support_take3
[ArchEquipment] add SketchArch attachment support (3rd attempt)
2021-12-21 11:47:22 +01:00
Yorik van Havre
1dd6fdb72d Merge pull request #5244 from paullee0/ArchWindow_2_SketchArch_UpdateAttachmentObject_support_take2
[ArchWindow] add SketchArch attachment support (2nd attempt)
2021-12-21 11:46:48 +01:00
Yorik van Havre
a318c19711 Merge pull request #5249 from Roy-043/Draft-Draft_Label-fix-label-type-list
Draft: Draft_Label fix label type list
2021-12-21 11:45:16 +01:00
Yorik van Havre
959f3f5039 Merge pull request #5266 from Roy-043/Draft-fix-Draft_Label-viewprovider
Draft: fix Draft_Label viewprovider
2021-12-21 11:44:31 +01:00
wmayer
27fc40a290 TD: [skip ci] partially fix issue 0004765 2021-12-21 11:39:17 +01:00
wmayer
20a36e1508 Part: expose HLR algorithm to Python 2021-12-21 10:49:03 +01:00
Chris Hennes
77e0d06bb8 Addon Manager: Bugfix for zip installation 2021-12-20 18:57:26 -06:00
Chris Hennes
3d583ade33 Addon Manager: Add Qt.Tool window flag 2021-12-20 16:12:02 -06:00
Chris Hennes
29eae3004f Addon Manager: Fix hashing with Qt 5.9 2021-12-20 14:21:00 -06:00
Chris Hennes
aaff737bd6 Addon Manager: Fix macro update code 2021-12-20 13:12:45 -06:00
Chris Hennes
e488f86bc9 Addon Manager: Add error checking for missing content 2021-12-20 10:37:58 -06:00
Chris Hennes
1b2f572ac4 Addon Manager: Support Qt 5.9
QRegularExpression was not added until Qt 5.12 -- add support for using
QRegExp in cases when QRegularExpression is not present.
2021-12-20 10:13:29 -06:00
wmayer
dbaf53a26a App: fix ObjectIdentifier::getDep
+ it's an obscure way to clear the error state by instantiating PyException, instead use the clear() method
+ do not handle unknown exceptions because this suppresses all exceptions and thus makes error search more complicated
2021-12-20 16:43:02 +01:00
wmayer
cda8545a29 Gui: in catch blocks first write the error message before cleaning the resources 2021-12-20 16:10:01 +01:00
wmayer
dcb0c4c75f App: workaround for boost's file_lock with version < 1.76 on Windows 2021-12-20 16:08:47 +01:00
wmayer
c944c559b7 TD: [skip ci] partially fix issue 0004765 2021-12-20 10:11:03 +01:00
wmayer
2c8ae49f48 PD: [skip ci] improve readability of argument list 2021-12-19 22:02:08 +01:00
Uwe
08137aaeb8 [PD] fix compilation issue with Helix
I introduced it with commit e87b0f4a
2021-12-19 21:58:19 +01:00
wmayer
060f3bf8f3 Gui: boost 1.76 provides an overloaded version of file_lock that accepts a wchar_t string 2021-12-19 21:24:17 +01:00
sliptonic
43f4fffa61 Merge pull request #5271 from sundtek/sundtek-discretize-bug
[PATH] change discretize value to fix issues
2021-12-19 12:35:13 -06:00
sundtek
f3ccd77f91 Update PathAdaptive.py
the internal unit is mm, only lowering the accuracy should be enough.
2021-12-20 01:15:59 +08:00
Uwe
b0bf7f5e5f [PD] style improvements for Helix
all done automatically by MSVC
2021-12-19 17:52:33 +01:00
Uwe
0e9decfe33 [PD] small code improvements for Helix 2021-12-19 17:34:14 +01:00
wmayer
9b8731a326 0004807: Freecad crashes when windows username contains special characters 2021-12-19 17:02:19 +01:00
wmayer
301c2ff4c8 Web: fix storage paths of web content 2021-12-19 16:56:48 +01:00
jbaehr
b3ba98fafe PD: Fix helix property visibility/writability (#5254)
[PD]: Fix helix property visibility/writeability

* Hide irrelevant and internal helix properties
- The `HasBeenEdited` property is only used internally to check whether to
  fill certain other parameters with initial values. So there is no need
  show it in the property grid at all.
- The `Outside` property is only used in the subtractive helix and thus
  hidden for the additive helix.

* Make derived helix properties read-only
Depending on the input mode, some properties are primary input, others
are derived. Prior to this change, also the derived properties have been
writable but their values are ignored and overwritten on the next
recompute. Now, when changing the input mode, only the primary input
props are writable.

* Reorder some helix properties
This change puts the reference axis and input mode at the top to become
more prominent. Only "Base" and "Axis" are higher in the list for
consistency with the other axis-based features.
2021-12-19 16:50:51 +01:00
sliptonic
f21991802e Merge pull request #5262 from sliptonic/bug/translation
[PATH]  Bug/translation
2021-12-19 09:33:11 -06:00