Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Recomputing causes mouse-button to get locked #7701

Open
2 tasks done
Glitchy-Tozier opened this issue Nov 4, 2022 · 2 comments
Open
2 tasks done

[Bug] Recomputing causes mouse-button to get locked #7701

Glitchy-Tozier opened this issue Nov 4, 2022 · 2 comments
Labels
Bug This issue or PR is related to a bug Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD

Comments

@Glitchy-Tozier
Copy link

Glitchy-Tozier commented Nov 4, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Forums discussion

https://forum.freecadweb.org/viewtopic.php?f=3&t=72947

Version

0.20 (Release)

Full version info

OS: KDE Flatpak runtime (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: (HEAD detached at 0.20.1)
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.9.9, Qt 5.15.5, Coin 4.0.0, Vtk 8.2.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)

Subproject(s) affected?

No response

Issue description

Steps to Reproduce

  1. Open attached file
  2. Use Blender-Navigation (it might happen with others, too)
  3. Navigate to Combo-view -> Tree-view (=Model-tab)
  4. Click on KeyNrDependentObjects
  5. In that std_part's Property Editor, inside the Data-tab, scroll all the way down until you find Config -> KeyNumber
  6. Change KeyNumber via the dropdown-menu
  7. Hover over the 3D-view and click on (and immediately release) the middle mouse-button to start rotating the screen
  8. See bug: Once recomputing has finished, you will locked inside the rotation-action

Anything else?

Not sure what to put into the "Subproject(s) affected?"-field. I've left it at "None"

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Glitchy-Tozier Glitchy-Tozier changed the title [Bug] Recomputing causes mouse to get locked in rotation-feature [Bug] Recomputing causes mouse-button to get locked Nov 4, 2022
@luzpaz
Copy link
Contributor

luzpaz commented Nov 4, 2022

Confirmed on the forum thread

@luzpaz luzpaz added Bug This issue or PR is related to a bug Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD labels Nov 4, 2022
@luzpaz
Copy link
Contributor

luzpaz commented Dec 2, 2022

@wwmayer reproduces the issue with a simplified example (in the thread)

import time
from PySide2 import QtCore

class Feature:
  def __init__(self, fp):
    fp.Proxy = self
  def execute(self, fp):
    time.sleep(1.0)
    print ("Execute")
    QtCore.QCoreApplication.processEvents()


doc = App.newDocument()
obj = doc.addObject("App::FeaturePython", "Feature")
obj.addProperty("App::PropertyFloat", "Number")
Feature(obj)
doc.recompute()

Now select Feature, change its Number property and middle-click inside the 3D view. The problem is caused by the function call QtCore.QCoreApplication.processEvents() that causes the system not to send the mouse release event to the navigation style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This issue or PR is related to a bug Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

No branches or pull requests

2 participants