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

Tutorial: Mouse cursor, painting fixes; clean up widget objects #3214

Merged
merged 5 commits into from
Feb 11, 2020

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Feb 11, 2020

This fixes the issue reported in #3212 where the mouse cursor displayed while the tutorial is open would either be the Forbidden symbol (inadvertently set for dockTutorial in the UI file) or some seemingly-random resizing cursor. We now explicitly setCursor(Qt.ArrowCursor) in the tutorial QWidget.

It also cleans up some other aspects of the tutorial code:

  1. The QWidget objects for closed tutorial popups are now cleaned up, previously they were building up and hanging around until the application terminated
  2. Painting of the dialog is streamlined by using a pen and brush, instead of stacking two filled rectangles
  3. A bunch of single-use variables (data copied into them, then referenced exactly one time) are eliminated by referencing the original source of the data directly
  4. The tutorial data structure is reformatted for readability

Fixes #3212

@ferdnyc ferdnyc changed the title Tutorial: Don't set Forbidden mouse cursor Tutorial: Mouse cursor, painting fixes; clean up widget objects Feb 11, 2020
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Feb 11, 2020

One more: Turns out drawPath() and fillPath() are redundant — fillPath() draws the filled path (without its outline), whereas drawPath() will draw the outline of the path (using the current QPen), and also fill with the Painter's current brush.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Feb 11, 2020

I'm going to merge this, because:

  1. It fixes the reported bug
  2. I'm a tiny bit worried that some of the drawing changes may not work correctly in really ancient Qt, so I want to test the resulting AppImage. If it breaks, I'll revert.

@ferdnyc ferdnyc merged commit da851d1 into OpenShot:develop Feb 11, 2020
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Feb 12, 2020

2. I want to test the resulting AppImage.

I did, and all is well.

@ferdnyc ferdnyc deleted the tutorial-cursor branch February 12, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong cursor style on Tutorial popup
1 participant