Commit Graph

25569 Commits

Author SHA1 Message Date
Zheng, Lei
715d67e2c3 Gui: do not prompt when closing view of temp document 2021-12-21 21:41:02 -07:00
Zheng, Lei
d0b7bf1669 App: fix property status restore 2021-12-21 21:41:02 -07:00
Zheng, Lei
0029f3206d Spreadsheet: improve copy/cut/paste cells
Add color bound around user copy/cut ranges. Do not touch Spreadsheet
object when cutting, only do so when pasting.
2021-12-21 21:41:02 -07:00
Zheng, Lei
2bd4404afb PartDesign: expose SubShapeBinderPython 2021-12-21 21:41:02 -07:00
Zheng, Lei
5f6b34ebad App: expose some property status bits to PropertyContainerPy 2021-12-21 21:41:02 -07:00
Zheng, Lei
39c04e4877 PartDesign: support CopyOnChange in SubShapeBinder 2021-12-21 21:41:02 -07:00
Zheng, Lei
99f199ad7e App: fix pending object remove on recomputing 2021-12-21 21:41:02 -07:00
Zheng, Lei
caa29060cf Spreadsheet: fix handling of absolute cell address 2021-12-21 21:41:02 -07:00
Zheng, Lei
0dcea9b2e1 App: warning on invalid cell offset in Expression 2021-12-21 21:41:02 -07:00
Zheng, Lei
a9895e4f04 Gui: expose 'Expression...' property editor menu action
For expression binding of all type of property. Previously this action
is only available if 'Show all' is activated.
2021-12-21 21:41:02 -07:00
Zheng, Lei
08cdd323b6 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
51d4e5c2a9 Draft: support 'CopyOnChange' in Draft link array 2021-12-21 21:41:02 -07:00
Zheng, Lei
4f29e81d0c 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
1f604ec632 Gui: fix property view linked property highlight 2021-12-21 21:41:02 -07:00
Zheng, Lei
bd201c82ce 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
7d23d5b984 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
82759f6203 Spreadsheet: Compilation fixes for cherry-picked commits 2021-12-21 21:41:02 -07:00
Zheng, Lei
2a3951ca32 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
79cda0a1b7 Spreadsheet: Compilation fixes for cherry-picked commits 2021-12-21 21:41:02 -07:00
Zheng, Lei
68fca40983 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
3d1b9f5c90 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
b76509bfea Gui: handle exception in property item display 2021-12-21 21:41:02 -07:00
Zheng, Lei
df6a7e4a56 App: add expression build-in href() for backward compatibility
As deprecated alias for hiddenref()
2021-12-21 21:41:02 -07:00
Uwe
fa50122c33 [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
c5f87d8ea8 [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
a40c57786c 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
9c74c0afb1 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
9770449be7 [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
f429a3630e Addon Manager: Fix github macro update code 2021-12-21 17:23:02 -06:00
Chris Hennes
b371487224 Addon Manager: Correct macro installation location 2021-12-21 14:48:35 -06:00
wmayer
427fe5d1e1 Part: handle removal of function HLRBRep_PolyAlgo::Angle in OCC 7.5 2021-12-21 21:26:00 +01:00
wmayer
ea85cf5e36 Part: expose Poly HLR algorithm to Python 2021-12-21 19:45:01 +01:00
Chris Hennes
4c303e339e Addon Manager: Correct proxy default 2021-12-21 11:19:21 -06:00
Yorik van Havre
283b0a6382 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
b84a099f68 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
6895813400 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
73e01719d2 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
5fba9cecae TD: [skip ci] partially fix issue 0004765 2021-12-21 11:39:17 +01:00
wmayer
73a986714c Part: expose HLR algorithm to Python 2021-12-21 10:49:03 +01:00
Chris Hennes
dede24d5e4 Addon Manager: Bugfix for zip installation 2021-12-20 18:57:26 -06:00
Chris Hennes
b2fbf64b37 Addon Manager: Add Qt.Tool window flag 2021-12-20 16:12:02 -06:00
Chris Hennes
f9fb1c9abb Addon Manager: Fix hashing with Qt 5.9 2021-12-20 14:21:00 -06:00
Chris Hennes
e7cde8bed0 Addon Manager: Fix macro update code 2021-12-20 13:12:45 -06:00
Chris Hennes
861c543fd9 Addon Manager: Add error checking for missing content 2021-12-20 10:37:58 -06:00
Chris Hennes
f45481ae36 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
2db73c099b 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
47eee38c02 Gui: in catch blocks first write the error message before cleaning the resources 2021-12-20 16:10:01 +01:00
wmayer
97cc44b889 App: workaround for boost's file_lock with version < 1.76 on Windows 2021-12-20 16:08:47 +01:00
wmayer
6ad156b6b7 TD: [skip ci] partially fix issue 0004765 2021-12-20 10:11:03 +01:00
wmayer
6d4d433080 PD: [skip ci] improve readability of argument list 2021-12-19 22:02:08 +01:00