Commit Graph

20627 Commits

Author SHA1 Message Date
Abdullah Tahiri
8ef32eab8b Sketcher: onUndoRedoFinished implementation and request
=======================================================

The sketchobject is now left in a known status after undo/redo transaction
2020-06-14 14:44:28 +02:00
Abdullah Tahiri
df4a8eb7ab Document/DocumentObject: onUndoRedoFinished()
=============================================

New mechanism for on-demand signaling of undo/redo transaction finalisation.

The mechanism consists of:
1) A status bit that is set, when an object should receive this signaling (e.g. because changes during transaction have been inhibited)
2) The new function to be called by the Document undo/redo actions when the transaction is over (for those objects having the status bit set).

Note 1: The undo/redo signals are now outside the undoing FlagToggler, this means that:
1) a call to isPerformingTransaction will return false.
2) a recompute the slot of such a signal will not be inhibited.

Note 2: The undo/redo signals are called once the documentobjects that requested to be notified after the trasaction is over have been notified.
The consequence is that the viewprovider can rely on the documentobject having a correct status.

I think that the behaviour of Note and Note 2 is the wanted behaviour of this signals, I cannot rule out that other parts of FC rely on the old
implementation.
2020-06-14 14:44:28 +02:00
donovaly
c6c549cc64 [TD] use KeyboardTracking for section view dialog
use the keyboardTracking feature as we now also do for the detail view dialog
2020-06-14 06:47:37 -04:00
donovaly
fc6a449fba [TD] remove hatch property DirProjection
as discussed in https://forum.freecadweb.org/viewtopic.php?f=35&t=47536&p=408075#p407904
the property DirProjection can go.
2020-06-13 20:45:31 -04:00
donovaly
0313f485db DlgPrefsTechDrawGeneral.ui: get rid of explicit font family
this is unnecessary since Qt will automatically use the available font. It only raises questions since one see in the commit diffs that depending on who modified the dialog, his system default font will appear. (like in the initial commit of this PR)
2020-06-13 20:44:57 -04:00
donovaly
1822fcc354 [TD] some wording fixes
- I had a look at Crowdin and saw that the translators don't know what to do with the uppercase letter words. And in fact we can use "normal" terms
- I also fixed a typo (missing 'd') to be consistent
2020-06-13 20:44:57 -04:00
donovaly
1ae69d2ac8 code simplification 2020-06-13 09:46:20 -04:00
donovaly
79b267a3dc [TD] fix hatch color issue
as discussed: https://forum.freecadweb.org/viewtopic.php?f=35&t=47536&p=407916#p407916
there are 2 types of SVG declarations possible
2020-06-13 09:46:20 -04:00
wmayer
7eaa0497cf Gui: [skip ci] add missing include to precompiled header 2020-06-13 12:22:47 +02:00
wmayer
8ed90c8586 Py2: fix Python 2 build failure 2020-06-12 17:51:33 +02:00
wmayer
9fdd17675b boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
033ddff089 cast between incompatible function types from 'PyObject* (*)(PyObject*, PyObject*, PyObject*)' {aka '_object* (*)(_object*, _object*, _object*)'} to 'PyCFunction' {aka '_object* (*)(_object*, _object*)'} [-Wcast-function-type] 2020-06-12 17:51:33 +02:00
wmayer
ce7c3a4213 replace use of deprecated function ftime with gettimeofday 2020-06-12 17:51:33 +02:00
wmayer
ab36a05fcd Fix -Wdeprecated-copy 2020-06-12 17:51:33 +02:00
wmayer
c535881459 Qt5: Replace deprecated functions of QString:
'QString& QString::vsprintf(const char*, __va_list_tag*)' is deprecated: Use vasprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
'QString& QString::sprintf(const char*, ...)' is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
6d0a136aad Qt5: 'void Q[Plain]TextEdit::setTabStopWidth(int)' is deprecated [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
0ca65a5095 Qt5: QDialog extension/orientation is deprecated [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
81f815d3f4 Qt5: 'void QFileDialog::setNameFilterDetailsVisible(bool)' is deprecated: Use setOption(HideNameFilterDetails, not enabled) instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
ec5547aaec Qt5: 'void QFileDialog::setConfirmOverwrite(bool)' is deprecated: Use setOption(DontConfirmOverwrite, not enabled) instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
66cbcdec7c Qt5: 'QVariant qVariantFromValue(const T&)' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
eced0cb568 Qt5: QDesktopWidget is deprecated use QScreen [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
deb39c4321 Qt5: 'QModelIndex QModelIndex::child(int, int) const' is deprecated: Use QAbstractItemModel::index [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
2c113442a7 Qt5: 'void QTime::start()' / 'int QTime::elapsed() const' / 'int QTime::restart()' are deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
1ee3d79d7c Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
db3f9008c0 boost: remove broken define that causes a warning: ISO C++11 requires whitespace after the macro name 2020-06-12 17:51:33 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
3f212ad8ac Porting Py3.8/Py3.9:
Since Py3.3: 'Py_ssize_t PyUnicode_GetSize(PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'PyObject* PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
97701e3a73 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-12 17:51:33 +02:00
wmayer
d14e17c558 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-12 17:51:33 +02:00
wmayer
6c80d8df0d Qt5: 'QString QFileInfo::readLink() const' is deprecated: Use QFileInfo::symLinkTarget() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
3cbec199ad Qt5: 'static QPixmap QPixmap::grabWidget(QObject*, const QRect&)' is deprecated: Use QWidget::grab() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
b143194f9d Qt5: 'static bool QPixmapCache::find(const QString&, QPixmap&)' is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
eced6aaed1 Qt5: 'int QImage::byteCount() const' is deprecated since Qt 5.10: Use sizeInBytes [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
58f148a722 Qt5: 'static void QCoreApplication::flush()' is deprecated since Qt 5.9 [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
f027c9b6ef Qt5: 'void QTreeWidgetItem::setTextColor(int, const QColor&)' is deprecated: Use QTreeWidgetItem::setForeground() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
d195cd5c98 Qt5: 'Qt::DropAction QDrag::start(Qt::DropActions)' is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
053312188b Qt5: 'void QListWidget::setItemSelected(const QListWidgetItem*, bool)' is deprecated: Use QListWidgetItem::setSelected() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
84a164ba30 Qt5: 'static QString Gui::TaskView::TaskWatcherCommands::trUtf8(const char*, const char*, int)' is deprecated [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
da6cb8a963 Qt5: 'bool QTreeWidget::isItemSelected(const QTreeWidgetItem*) const' is deprecated: Use QTreeWidgetItem::isSelected() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
0984bedebc Qt5: 'bool QTreeWidget::isItemExpanded(const QTreeWidgetItem*) const' is deprecated: Use QTreeWidgetItem::isExpanded() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
45017ec839 Qt5: 'void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)' is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
c814eb1a50 Qt5: 'QString::null' is deprecated: use QString() [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
85109240b5 clang/gcc/cmake: [skip ci] suppress deprecated-copy warnings for OpenInventor class SbMatrix 2020-06-12 14:49:18 +02:00
Yorik van Havre
be0c8eab25 Arch: Better support for App::Parts in Arch Windows 2020-06-12 14:22:39 +02:00
donovaly
fbf0b23e05 [TD] make all hatch patters plain SVG
- everything that is part of the drawing should be plain SVG (strictly following the SVG specification) to assure that every SVG program can handle it (e.g. Internet browsers).
The hatch patterns however contained old stuff like traces of Sodipodi that might be a problem in the future.
2020-06-12 08:13:10 -04:00
donovaly
9726ad3f4a [TD] add dialog for hatches
as discussed in the forum, the hatch feature misses a dialog. So here it is. The code is more or less just the one of the existing GeomHatch dialog
2020-06-12 08:12:37 -04:00
donovaly
7366339266 [TD] GeomHatch dialog: use sensible hatch limits
- negative scale and line width is not sensible and lead to strange effects thus set a minimum
- set the minimum reasonably above 0 since e.g. a hatch scale of 0.01 fills 8 GB RAM -> out of RAM error
- disable KeyboardTracking since we don't want a time-consuming recomputation while the user changes a value
2020-06-12 08:12:07 -04:00
donovaly
4d0cd751da [TD] detail view: add missing tooltip 2020-06-12 08:11:25 -04:00
wmayer
b2f5a3bd90 [skip ci] avoid to redefine GL_GLEXT_PROTOTYPES if already defined 2020-06-12 14:07:45 +02:00
wmayer
c8be528f37 Qt5: [skip ci] 'void QTextEdit::setTabStopWidth(int)' is deprecated [-Wdeprecated-declarations] 2020-06-12 13:56:57 +02:00