Search found 30 matches

Go to advanced search

by efferre
Mon Dec 28, 2020 11:04 am
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

davidosterberg wrote:
Mon Dec 21, 2020 12:43 pm
I have also noticed problems when pasting code to the Python console on Linux. So work on this is appreciated from me :)
patch has been integrated in master with https://github.com/FreeCAD/FreeCAD/pull/4192
by efferre
Tue Dec 22, 2020 11:45 am
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

efferre wrote:
Tue Dec 22, 2020 10:17 am
I'll recompile to see the effect.
The return is indeed needed otherwise both events have effect producing a double paste in two positions.
by efferre
Tue Dec 22, 2020 10:17 am
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

This is also beyond my knowledge but I find this a bit weird though. I think that 'send(this)' is a problem because it will indirectly call itself in a recursive way. The recursion is blocked by using e->spontaneous() which returns true only for the real event. The new event is not delivered at all...
by efferre
Tue Dec 22, 2020 8:51 am
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

Indeed may be better in C++ to stop original event propagation and send a new one. I have produced the following patch which seems to work fine: --- ./src/Gui/PythonConsole.cpp 2020-12-21 23:53:21.843905095 +0100 +++ ./src/Gui/PythonConsole.cpp.new 2020-12-22 00:09:29.385814040 +0100 @@ -963,6 +963...
by efferre
Mon Dec 21, 2020 5:17 pm
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

Couldn't find any evidence of this, but I trust you. ;) https://code.woboq.org/qt5/qtbase/src/gui/kernel/qevent.cpp.html line 413, the function is not even documented. Even python PyQt bindings don't export while it's available with PySide :-) Working correctly isn't enough to prove something is go...
by efferre
Mon Dec 21, 2020 4:13 pm
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

ATM I don't see why you couldn't use the old 'pos()' to get the exact same thing. ;) For some reason, it is important (to me) that FC can be compiled with Qt 5.6. Also I don't really understand your version check as 'localPos' was introduced in Qt 5.0. The function setLocalPos() has been introduced...
by efferre
Mon Dec 21, 2020 12:57 pm
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

I think the current behaviour is quite annoying and unexpected from the point of view the user, I would go for requiring min version of QT in cmake files rather than conditional #ifdef in the code. But before preparing the PR I would like to know which solution I should implement to avoid useless co...
by efferre
Mon Dec 21, 2020 11:57 am
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

Re: paste problem with Python console

I have created a simple patch to resolve the issue, I am able to create a pull request. In the meantime here are attached the changes: --- ./src/Gui/PythonConsole.cpp 2020-12-16 23:40:33.232632674 +0100 +++ ./src/Gui/PythonConsole.cpp.new 2020-12-18 23:39:17.072377743 +0100 @@ -963,6 +963,17 @@ void...
by efferre
Fri Dec 18, 2020 7:56 pm
Forum: Developers corner
Topic: paste problem with Python console
Replies: 15
Views: 533

paste problem with Python console

The Python console has a problem with Linux systems by using the paste feature offered by the operating system when using the middle mouse button, the copied text is placed at the pointer coordinate and not at the last line of the widget where the code would be ready to be executed. I have noticed t...
by efferre
Wed Dec 16, 2020 5:47 pm
Forum: Help on using FreeCAD
Topic: rectangle with rounded corners
Replies: 16
Views: 417

Re: rectangle with rounded corners

the two scripts look different, one has some GUI while the other no so probably the aim is different

Go to advanced search