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

Schematic Editor: View All -> wrong scaling #426

Closed
3813127458 opened this issue Jan 1, 2024 · 5 comments
Closed

Schematic Editor: View All -> wrong scaling #426

3813127458 opened this issue Jan 1, 2024 · 5 comments

Comments

@3813127458
Copy link

The schematic editor performs wrong graphics scaling of the schematic diagram at "View All".
Probably the long Nutmeg script is the root cause for this issue(?)

HBM_9.sch.zip

View_All.mp4

Version Info:

Qucs-S 24.1-7df0e3e9
Operating System: Manjaro Linux
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.11
Kernel Version: 6.6.8-2-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz
Memory: 15,3 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4400
Manufacturer: CompuLab Ltd.
Product Name: Intense-PC2 (IPC2)
System Version: 1.x

@wawuwo
Copy link
Contributor

wawuwo commented Jan 1, 2024

I've conducted a quick research: it seems like the cause of described behavior is this line. It calculates the width of a rectangle able to hold the text of the script, but selected boundingRect method doesn't treat newlines as line breaks (see QT doc there, so the script is treated as a one-liner. Possible solution is to use one of the overloaded boundingRect methods which treat newlines properly.

I'll try to make a fix using a proper method.

wawuwo added a commit to wawuwo/qucs_s that referenced this issue Jan 1, 2024
Newlines in the text of schematic element's property should be treated
as line breaks otherwise the text of an element would become a single
very long line and the calculated width of an element would be incorrect.

This commit fixes such problem by replacing newlines-ignorant method with
a newlines-aware one.

Fixes ra3xdh#426
ivandi69 pushed a commit to ivandi69/qucs_s that referenced this issue Jan 2, 2024
Newlines in the text of schematic element's property should be treated
as line breaks otherwise the text of an element would become a single
very long line and the calculated width of an element would be incorrect.

This commit fixes such problem by replacing newlines-ignorant method with
a newlines-aware one.

Fixes ra3xdh#426
@ra3xdh ra3xdh closed this as completed in a30a2cf Jan 3, 2024
@ra3xdh
Copy link
Owner

ra3xdh commented Jan 3, 2024

Fixed by #429

@tomhajjar
Copy link

Another way this issue is caused is when a wire or any "Painting" like a line, ellipse, circle..etc is so short or small to be unviewable.

A "phantom" net caused by cut-paste or moving multiple items can also be a pain to locate and delete

I've had to use a text editor to find and delete the item...

@wawuwo
Copy link
Contributor

wawuwo commented Jan 7, 2024

@tomhajjar could you please provide an example file or a video? I'm not sure I understand clearly how to reproduce the described issue.

@tomhajjar
Copy link

tomhajjar commented Jan 7, 2024

Make a wire or any "Painting" like a line, ellipse, circle..etc that is so short or small to be unviewable and place it out of the desired viewable area.

Attached is a schematic with a line and ellipse with a dimension of "0". If these end up "off screen" they both screw up "Zoom All" AND they cannot be selected for deletion. Only a text editor will find and delete them.

The "phantom" net is harder to reproduce since I don't know what causes it other than it randomly occurs during a cut-paste or moving of multiple items. The net name is visible but detached from the actual net itself. The net name can be so far away from the "schematic" it becomes invisible when zoom all is used. If you can find it you can click on it and delete it. I usually end up deleting the net and hope it disappears but unfortunately it doesn't always work. I end up using a text editor to find it in the schematic and delete it.

2024-01-07_115249

Test_prj.zip

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

No branches or pull requests

4 participants