Commit Graph

745 Commits

Author SHA1 Message Date
Stefan Tröger
f1c307dc28 PartDesign: Boolean must show the operation result, not the children. fixes #0003184 2017-09-21 10:48:38 +02:00
Itai Nahshon
2e2c041885 PartDesign: Multi Transform Linear Pattern fix. 2017-09-16 01:25:14 +03:00
wmayer
76e8d81ae2 fix override warnings 2017-09-15 21:55:30 +02:00
wmayer
770c9ce095 fix various coverity issues 2017-09-15 11:48:38 +02:00
wmayer
09737f2db3 rename method from remObject to removeObject to be more readable 2017-09-13 18:57:38 +02:00
wmayer
f663a754c8 fix cyclic dependency if body is created when creating a shape binder 2017-09-13 12:20:16 +02:00
wmayer
dc13d85d37 fix inconsistency between context-menu and default edit mode PD primitives 2017-09-12 19:49:07 +02:00
Peter Lama
756ed3381e Fix Shape Binder crash when nothing selected first
Partially resolves issue #2517
2017-09-10 14:08:39 +02:00
Pablo Gil
a1d1a4cb4b updating Body, Part and Assembly icons 2017-09-09 18:29:53 +02:00
Stefan Tröger
034219771f PartDesign: Prevent problems with link scopes during feature creation 2017-09-09 16:55:55 +02:00
Stefan Tröger
972b89d0a0 Make PartDesign::Boolean work with new Link structure
This is the first feature that used GeoFeatureGroupExtension and required links to the groups inside as well as to things on the same level. Hence a few modifications to link scopes have been nesseccary.
2017-09-09 16:55:55 +02:00
Stefan Tröger
dd87094672 Move App::Part to a separate global toolbar 2017-09-09 16:47:07 +02:00
Stefan Tröger
d0954e6e42 Allow interchangable use of link properties and their derivatives 2017-09-09 16:47:07 +02:00
Yorik van Havre
fe3f671b81 Updated translation strings (and sent to crowdin) 2017-08-31 10:46:55 -03:00
luzpaz
467ef55788 Misc. typos discovered via crowdin
should close several crowdin issues.
2017-08-28 11:50:33 -03:00
wmayer
7fbc80c11e fix crash when moving a free sketch to a body 2017-08-19 13:20:53 +02:00
Kurt Kremitzki
2e92f301d6 PDN: Fix Loft claimChildren to only grab sketches 2017-08-12 14:48:40 +02:00
Kurt Kremitzki
0d3f5b114c PDN: Fix Pipe claimChildren to only grab sketches 2017-08-12 14:48:14 +02:00
Kurt Kremitzki
b6abbeb9cc PDN: Automatically activate body if document has only 1 2017-08-12 14:45:28 +02:00
triplus
bab75bbcb7 PDN - what's this and command names improvements 2017-08-06 20:47:09 +02:00
Eivind Kvedalen
04b176ebfb PartDesign Hole Feature implemented.
Minor contributions from Mateusz Skowroński <skowri@gmail.com>
2017-07-26 23:39:00 +02:00
Kurt Kremitzki
7f34faa8b8 PDN: Make Loft and Pipe claim children correctly 2017-07-26 23:16:12 +02:00
Kurt Kremitzki
373d81b2bc PDN: Make Loft hide its sections when task dialog accepted 2017-07-26 23:16:12 +02:00
Yorik van Havre
80ad5737f0 Fixed typo - crowdin issue 2017-07-24 11:02:52 -03:00
wmayer
7cfc084e47 fixes #0003122: FC 0.17 crashes when a sketched located outside a body object 2017-07-16 16:56:06 +02:00
Kurt Kremitzki
2f6f00100f Revise PartDesign Loft tooltips 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
027418a16d Make PartDesign Loft have different tooltip than PartDesign Pipe 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
7f03cca88c Check PartDesign::AdditivePipe's auxiliary spine for existence before deciding its externality 2017-07-01 19:30:49 -05:00
wmayer
989fe4028e various fixes:
+ fix typos
+ fix const correctness
+ whitespace improvements
2017-06-19 17:18:16 +02:00
Stefan Tröger
bfb95e3d12 Partially fix PartDesign move test 2017-06-19 15:37:09 +02:00
Stefan Tröger
f9200f4502 Extend python interface for groups and fix test cases 2017-06-19 15:37:09 +02:00
Abdullah Tahiri
ab48fdb6f5 render both faces 2017-06-16 00:15:22 +02:00
wmayer
c1070e5e8e NULL is defined as nullptr on FreeBSD and causes a build failure
For more information see: https://forum.freecadweb.org/viewtopic.php?f=4&t=22897&p=177660#p177660
2017-06-11 18:48:23 +02:00
Yorik van Havre
6e0f060e96 Fixed typo errors 2017-06-07 16:01:22 -03:00
Abdullah Tahiri
4b042536f8 Notification to the user that a body is not active when inserting a datum entity - fixes #2511 2017-05-31 02:41:29 +02:00
Abdullah Tahiri
2686f51c57 Checking for Document Restoring when extension has a null property
==================================================================

The problem:

OriginGroupExtension::OriginGroupExtension () {

    initExtensionType(OriginGroupExtension::getExtensionClassTypeId());

    EXTENSION_ADD_PROPERTY_TYPE ( Origin, (0), 0, App::Prop_Hidden, "Origin linked to the group" );
}

initializes the Origin property to null.

Then Document::Restore => readObjects => addObject => slotNewObject => ViewProviderDocumentObject::updateView => ViewProviderBody::updateData => ViewProviderGeometryObject::updateData =>
ViewProviderDocumentObject::updateData => ViewProvider::updateData => ViewProviderOriginGroupExtension::extensionUpdateData => updateOriginSize() => OriginGroupExtension::getOrigin,

the latter throws an exception because the origin property is null.

Afterwards, the origin property is initialized during Document::Restore => readObjects => ExtensionContainer::Restore() => PropertyContainer::Restore() => App::PropertyLink::Restore()
=> App::PropertyLink::setValue() => Property::hasSetValue, which triggers an onChange: Body::onChanged => BodyBase::onChanged => Feature::onChanged => DocumentObject::onChanged =>
Document::onChangedProperty => Document::slotChangedObject => ViewProviderOriginGroupExtension::slotChangedObjectGui => ViewProviderOriginGroupExtension::updateOriginSize =>
OriginGroupExtension::getOrigin,

now, the latter that is the same that was throwing the exception and generating the error message above, does not throw anymore because Origin has been initialized.

When creating a new object, isNew==true; whereas when loading a file, isNew==false. Therefore, when loading a file setupObject is not executed. SetupObject, effectively initializes
the extension via: Body::setupObject => DocumentObject::setupObject => OriginGroupExtension::onExtendedSetupObject.

DocumentObject * Document::addObject(const char* sType, const char* pObjectName, bool isNew)
{
    [more code here]
    // Call the object-specific initialization
    if (!d->undoing && !d->rollback && isNew) {
        pcObject->setupObject ();
    }
    [more code here]

As DocumentObject code is generic for all objects (workbenches), by design it was chosen to initialize the object only if new. Therefore a object or an extension of a object being restored,
between the addition (addObject) and the restoring of the properties, must by design expect it not to be initialized.

The solution:

Making use of the Restore flag at document level (the one at object level is not sufficient), no exception regarding the null property is reported during document restoring.

Ticket:
https://freecadweb.org/tracker/view.php?id=2530

fixes #2530
2017-05-30 13:01:45 +02:00
Yorik van Havre
2a2ab3c4ef Updated translations 2017-05-25 10:04:05 -03:00
asiersarasua
ea3d86b735 Fix typos 2017-04-20 09:49:19 +02:00
wmayer
6b26fa6ca7 fix segmentation fault in TaskFeaturePick::makeCopy 2017-04-17 11:07:54 +02:00
wmayer
9a3b2a976e when removing faces in thickness tool via context menu then remove selection gate 2017-04-15 13:29:19 +02:00
wmayer
eb02efa004 do not use translated text for icon names 2017-04-15 12:58:35 +02:00
wmayer
004324bbc5 fix scan coverity issues: uncaught exception 2017-04-11 14:03:08 +02:00
Abdullah Tahiri
09dfcf6bd7 Part Design: Keep body transparency when adding a new feature
=============================================================

Prior this commit, if a body has transparency (let's say 55%) and a new feature is added, the transparency is lost until you update it again in the body.

This prevents to actually see through while editing the feature (e.g. while setting the length of a pad) and is very annoying as the user
is required to go back to the body properties, where the old value (e.g. 55%) would still be there and change it to another value (56%) to effect it.
2017-04-11 10:41:27 +02:00
wmayer
1d336fe72e avoid possibly crash when trying to add objects to the wrong document 2017-04-07 15:32:22 +02:00
wmayer
52c3b4580e properly close task dialog when document is getting closed 2017-04-07 15:16:04 +02:00
wmayer
bf542266c4 close sketch selection task panel on undo 2017-04-07 13:07:52 +02:00
wmayer
394ea471c6 perform auto view fit when creating body object on sketch creation 2017-04-07 10:22:40 +02:00
Ian Rees
ac2f9f8902 Make Body object on creation of Sketch/Primitive 2017-04-06 19:26:19 +02:00
Ian Rees
e2b73e5bb1 Add abort method to PartDesign TaskDlgFeaturePick 2017-04-06 19:26:19 +02:00
Ian Rees
05b5b48af8 Refactor PartDesign create primitive commands 2017-04-06 19:26:19 +02:00