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

Selection Box, Selecting Items and Moving Items Issues #739

Closed
tomhajjar opened this issue Jun 7, 2024 · 21 comments · Fixed by #740 or #741
Closed

Selection Box, Selecting Items and Moving Items Issues #739

tomhajjar opened this issue Jun 7, 2024 · 21 comments · Fixed by #740 or #741
Assignees
Labels
Milestone

Comments

@tomhajjar
Copy link

tomhajjar commented Jun 7, 2024

The selection box has radically changed making it unusable on Windows. The mouse Cursor is not even close to the corner of the selection box. Why is the selection box using thick lines? It makes selecting items in close proximity to others difficult.

It's almost impossible to select items as well. The cursor has to be placed up to the right away from the item you want to select. Trying to select a single item when multiple items are nearby is impossible.

Also when I select an item and try to move it, it jumps down to the left away from the cursor making moving or resizing items impossible.

It's literally impossible to make or edit a schematic, sub-circuit or model. I'm trying to test the new Varactor lib but had to give up. Everything I try to edit turns into garbage. The old method used in Qucs is preferred.

20240607_113832

@ra3xdh ra3xdh added the bug label Jun 7, 2024
@ra3xdh
Copy link
Owner

ra3xdh commented Jun 7, 2024

I can only partially reproduce your bug report. I have tested the both the latest Linux and Windows version. The results are the following:

  • Schematic editing, insert, select, move device or wire works as expected
  • Placing paintings in schematic mode works as expected
  • Placing paintings in symbol editing mode has shifted mouse pointer. See the attached screencast. Linux version is affected too. Only some subcircuits are affected.
Screencast_20240607_191017.webm

I think this may appear after #723 @wawuwo , could you have a look? You may use this schematic containing subcircuit symbol as the test case.
Tunnel_new.sch.gz

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 7, 2024

I'm trying to test the new Varactor lib but had to give up.

New Varactor.lib library will work with stable version of Qucs-S. Just copy the library file to the share/qucs-s/library subdirectory. You need not to draw symbols for this library. It uses a standard diode model with Cj0 parameter set according device specification.

@tomhajjar
Copy link
Author

It seems to be worse when editing sub-circuit "circuit symbol".

Clicking on a symbol item or "line" causes it to jump.

@tomhajjar
Copy link
Author

tomhajjar commented Jun 7, 2024

Is there a reason you didn't use the varactor symbol for the default symbol for library and schematic? One is forced to change it when making the schematic.

For a Varactor C versus V curve to be correct either a look up table of C/V needs to be used or a Diode with Cj0, "M", Vj, and Rs specified. Look up table requires a script. Another option is to make a sub-circuit including packaging parasitics.

In reality varactors are starting to disappear from designs....

2024-06-07_122754
2024-06-07_123110

Varactor_ngspice_prj.zip

wawuwo added a commit to wawuwo/qucs_s that referenced this issue Jun 7, 2024
The 'paint' function of ID_text missed the restore() call on painter,
which led to carrying the changes made to painter further down the
call chain. In other words, the painter state *after* painting the
ID_text wasn't the same as *before* doing it, and everything painted
after the ID_text was affected by this change in painter's state.

This commit add missing restore() call.

Fixes: ra3xdh#739
@wawuwo
Copy link
Contributor

wawuwo commented Jun 7, 2024

Hello guys! I am sorry, that is totally my mistake: I missed the restore() call on QPainter in id_text::paint.

The id_text is this little thing:
image

The lack of restore() makes changes to QPainter applied in id_text::paint "stick" to it and because of that everything painted after the id_text is affected (mostly shifted in some direction). The size of "shift" depends on position of id_text. Try move the id_text to see how it works.

I believe #740 should fix the issue.

@wawuwo
Copy link
Contributor

wawuwo commented Jun 8, 2024

Why is the selection box using thick lines?

Just a consequence of refactoring of rendering. It's possible to make it use the same line width despite of zoom level, like this:

selection.mov

@tomhajjar
Copy link
Author

tomhajjar commented Jun 8, 2024

When I make detailed schematic symbols I use the 1x1 grid. Being able to easily select, move or resize specific items is important. The older Qucs system I never had an issue.

I mentioned the select box line width because it is a lot thicker than the old select box. In fact many symbols seem to have thicker lines. I wanted to use the 1x1 grid to confirm line widths are what they should be.

The bug made testing impossible so I need a new nightly release to check out how well your "new" system works. There is no reason to make any changes other than bug fixes just to please me.

2024-06-07_224942

Symbol_creation_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 8, 2024

@tomhajjar, You may download the snapshot with fix using the following link: https://github.com/ra3xdh/qucs_s/actions/runs/9423149593/artifacts/1580665163 See also "Artifacts" section of the build page: https://github.com/ra3xdh/qucs_s/actions/runs/9423149593?pr=740

@ra3xdh ra3xdh added this to the 24.3.0 milestone Jun 8, 2024
@wawuwo
Copy link
Contributor

wawuwo commented Jun 8, 2024

@ra3xdh what about the selection rectangle border line width? Should it be kept as is or changed to be like in the example above?

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 8, 2024

what about the selection rectangle border line width?

The selection rectangle board width should not be scaled with schematic. This should be fixed if possible. It the fix requires some deep modifications, the things may be left as is. The fix may go to the separate PR.

@tomhajjar
Copy link
Author

tomhajjar commented Jun 8, 2024

Guys I now have problems with my Main and Back-up PCs after downloading the above snap shot. Windows will not let me write the files to the QUCS-S 24.2.0 folder. It keeps telling me I need Administrator rights...

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 8, 2024

This is definitely not related to snapshot itself. The archive dosen't modify the write permissions of the folders. I am regularly testing both Windows 10 and 11 and everything works as expected.

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 8, 2024

The selection rectangle border width fixed by #741 (merged)

@wawuwo
Copy link
Contributor

wawuwo commented Jun 8, 2024

@tomhajjar It's sounds very strange (almost impossible) that a mere downloading a file turned off the write permission of some specific folder. I believe this wasn't the first time when you updated the app from a downloaded snapshot-installer, maybe something had changed since the last update? Did you use the same user as before? Anyway it's hard to tell anything without you providing more details, tracing your steps

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 8, 2024

I now have problems with my Main and Back-up PCs after downloading the above snap shot. Windows will not let me write the files to the QUCS-S 24.2.0 folder.

I have just tried to download an archive from the link in this thread and extract it in some folder using physical Windows-10 installation. Everything works as expected. You should allow to run executable qucs-s.exe from unknown source. FS write permission is not locked. The most probably this problem is on PC side.

@tomhajjar
Copy link
Author

tomhajjar commented Jun 8, 2024

There was definitely something wrong with the last download using the link above. The latest download from the link below doesn't have this problem but unfortunately selection box and cursor positions are still wrong as shown below. It's also impossible to select items close to each other.
https://github.com/ra3xdh/qucs_s/releases/tag/continuous_build

Is there another download link I should use?

20240608_173257

@tomhajjar
Copy link
Author

tomhajjar commented Jun 9, 2024

Another issue I'm having is some of the lines used to make the subcircuit "diode" symbol are in the wrong position on old subcircuits I made. See the two subcircuits in the attached project. They look normal on Qucs-S 0.0.24.

If I click on the "SUB" parameters and move it, the lines making the "diode" symbol jump back where they are supposed to be.

If I select a line, the line jumps to another location even though I only selected it.

2024-06-08_231859
2024-06-08_231921
2024-06-08_232234

Varactor_ngspice_prj.zip

@tomhajjar
Copy link
Author

tomhajjar commented Jun 9, 2024

As I go through old projects with subcircuits I'm finding more symbols that are "corrupted". Some of the lines and text are displayed in the wrong position BUT the symbols look OK in older Qucs-S versions like 0.0.24.

Something is wrong with Qucs-S 24.2.1. It doesn't work properly displaying or editing symbols and the selection box is offset from the cursor. Everything works and displays correctly on Qucs-S 0.0.24.

Attached is an old project both Vadim and I discussed in the past. The "genopa" subcircuit symbol is screwed up. If I select "SUB" and move it, the symbol displays correctly.

2024-06-08_234245
2024-06-08_234420

OpAmp_Sub_Param_Pass_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 9, 2024

There was definitely something wrong with the last download using the link above.

Sorry, I cannot confirm this. I have tried two physical machines with Windows 10 and 11 and everything works as expected. ZIP archives don't support changing write permissions of the FS. I can only suppose that some anti-virus software prevent an execution of the software from unknown source in a such way and marks the directory as read-only. The #740 doesn't contain any FS interaction and cannot change the directory write permission

The latest download from the link below doesn't have this problem but unfortunately selection box and cursor positions are still wrong as shown below.

The latest continuous release doesn't contain #740 merged and the symbol editing is not fixed in it.

As I go through old projects with subcircuits I'm finding more symbols that are "corrupted".

This issue is the same issue with QPainter. Everything that is drawn after ID Text has a shift. This is fixed by #739. I don't observe the mentioned issues on my build anymore.

@ra3xdh
Copy link
Owner

ra3xdh commented Jun 9, 2024

I am merging #740 . Please try the next continuous release. It contains a fix for symbol editing.

ra3xdh added a commit that referenced this issue Jun 9, 2024
Fix #739: Restore QPainter state after paining the id_text element
@tomhajjar
Copy link
Author

I confirm the latest nightly release fixed the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants