Commit Graph

1752 Commits

Author SHA1 Message Date
Eivind Kvedalen
0684109663 ExpressionBinding/QuantitySpinBox: skip updating if bound to a read-only property. 2017-07-26 23:39:00 +02:00
Eivind Kvedalen
03c39f3a13 Added PropertyPosition and PropertyDirection classes. Basically PropertyVector classes with units. 2017-07-23 22:14:05 +02:00
wmayer
d5b77eb061 make link clickable as suggested in PR 892 2017-07-22 16:50:19 +02:00
Itai Nahshon
258ca0723d Add UnitsSchemaMmMin - izes are only in mm, speed in mm/munute. 2017-07-18 17:41:36 +02:00
wmayer
234df4e661 calling close() causes the MDI view to get deleted as soon as possible while deleteLater() waits until the GUI is responsive 2017-07-17 11:11:58 +02:00
wmayer
eb9a4ab21e add locale information to system information 2017-07-16 08:14:26 +02:00
wmayer
262759d371 add export macro, extend enum of class AbstractMouseSelection 2017-07-15 15:46:13 +02:00
luzpaz
117fe44b0c typo fix 2017-07-10 19:29:55 -03:00
luzpaz
ba17b99cfb typo fix 2017-07-10 19:29:55 -03:00
wmayer
9148412400 + exception handling in FreeCADGui.addModule 2017-07-07 09:58:28 +02:00
wmayer
2f5ff3186c fix for mixing up SchemeVersion and FileVersion 2017-07-06 17:59:01 +02:00
wmayer
75d6672159 fix some issues:
+ fix unicode <-> utf-8 conversion
+ fix translation issue
+ fix closing logic
2017-07-05 15:00:15 +02:00
Markus Hovorka
f9f2d8c31b Add TextDocument with full size editor
A new document object App::TextDocument. It has a property Text which
holds the text of the document as a string. This commit also contains a
full size editor based on QPlainTextEdit. It can only be used by the
TextDocument and has a read only mode invoked for read only documents
(ReadOnly property set to true). The editor is invoked by a double
click on the TextDocument.
2017-07-04 19:36:10 +02:00
Markus Lampert
c07fe542d7 Forward modifyStandardButtons into python task dialogs. 2017-06-21 11:41:35 -07:00
wmayer
90653787a6 various fixes:
+ fix typos
+ fix const correctness
+ whitespace improvements
2017-06-19 17:18:16 +02:00
Stefan Tröger
601d9bd8e3 Drag&Drop: Tree is responsible for undo/redo
The user expects to undo the drag and drop action with a single click (as it happens with a single drag&drop action). Hence the command must be handled by the tree, not the viewproviders.
2017-06-19 15:37:09 +02:00
Stefan Tröger
ce9a078584 GeoFeatureGroup: Handle drag into document 2017-06-19 15:37:09 +02:00
Stefan Tröger
2939f290ad Groups: Handle add and remove object correctly 2017-06-19 15:37:09 +02:00
Stefan Tröger
fd62ef30f3 Unify and fix group handling in geofeaturegroups 2017-06-19 15:37:09 +02:00
Stefan Tröger
c3a9d43143 DependencyGraph: grouping & unflatten is optional
Property group "User parameter:BaseApp/Preferences/DependencyGraph" has two booleans to enable subgraphing and unflatten (by default on): "Unflatten", "GeoFeatureSubgraphs"
2017-06-19 15:37:09 +02:00
Stefan Tröger
f3f1706c9f DependencyGraph: Fix colors and unflatten 2017-06-19 15:37:09 +02:00
Stefan Tröger
4ab23fcb87 DependencyGraph: Add unflatten step 2017-06-19 15:37:09 +02:00
Stefan Tröger
b230d3c962 DependencyGraph: Show GeoFeatureGroups as subgraph. fixes #0002142 2017-06-19 15:37:09 +02:00
Stefan Tröger
d5022483c6 Fix drag&drop of geofeature groups. fixes #0002835 fixes #0002796 2017-06-19 15:37:09 +02:00
wmayer
def4152640 fix bug with multiple object names in selection view when selecting in tree view 2017-06-19 14:59:32 +02:00
wmayer
534fec23c9 due to branding reasons avoid a direct mentioning of FreeCAD 2017-06-18 15:52:21 +02:00
Yorik van Havre
ce1de7b631 Added pref option to disable the FreeCAD logo in the FCStd file thumbnail 2017-06-16 00:25:42 -03:00
wmayer
62329d1cf9 issue #0003070: VRML 2 crashes with corner cases 2017-06-11 16:41:52 +02:00
wmayer
4cda387e61 py3: support of Python 3.4 2017-06-06 23:49:42 +02:00
wmayer
057192f314 py3: fix several crashes 2017-06-04 11:12:53 +02:00
wmayer
729cfd8155 py3: fox compiler warnings
issue 0000995
2017-06-04 00:17:57 +02:00
Abdullah Tahiri
b4e942c08b 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
2a59e2ec67 Using PropertyFont in Arch, Draft 2017-05-27 22:55:56 -03:00
Yorik van Havre
de4d33cb84 Updated translations 2017-05-25 10:04:05 -03:00
Yorik van Havre
ec067c77d2 Display the number of selected elements in Selection View 2017-05-21 19:10:19 -03:00
wmayer
769bc97f63 workaround for broken tree indicators with Qt 5.6 under Windows 2017-05-21 10:02:26 +02:00
wmayer
0e605eccb3 workaround for broken tree indicators with Qt 5.6 under Windows 2017-05-20 21:21:30 +02:00
wmayer
982d73d93b extend error text set in Python console by additional information if present 2017-05-17 19:59:17 +02:00
wmayer
75652c247e in Python console check if exception is dict and set more readable text 2017-05-17 19:37:34 +02:00
wmayer
31710838d4 issue #0003025: Unhandled unknown exception caught in GUIApplication::notify when opening file 2017-05-16 10:37:34 +02:00
wmayer
61ad4c5e8d make creation of sub-elements in selection view more flexible 2017-05-10 15:01:36 +02:00
Yorik van Havre
97e93f01ed Added a 'show' option to the Selection View's context menu 2017-05-09 19:55:40 -03:00
DeepSOIC
775563baae Gui: expose ViewerPy.redraw() method 2017-05-08 11:44:41 -03:00
Yorik van Havre
1fb606f65d py3: Gui: files P-Z ported to python3 2017-05-06 20:11:31 +02:00
looooo
b5f83cdfef py3: resolve dangling-pointer issues 2017-05-06 17:23:27 +02:00
Yorik van Havre
7e39fed862 py3: Gui: files A-P ported to python3 2017-05-06 17:23:27 +02:00
DeepSOIC
7cf1cfb63e Gui: GestureNav: disable rotation when over a dragger 2017-05-06 12:48:26 +03:00
DeepSOIC
e1c68e59a6 Gui: GestureNav: fix constant hand cursor 2017-05-06 02:15:45 +03:00
triplus
4bf27344c8 Boot phase reference point 2017-05-04 20:03:34 +02:00
wmayer
ffa10bbf0c Qt5: workaround for undocking of mdi view
fix minor issues reported by clang static analyzer
2017-05-03 22:01:46 +02:00