ra3xdh / qucs_s

Qucs-S is a circuit simulation program with Qt-based GUI
https://ra3xdh.github.io/
GNU General Public License v2.0
853 stars 109 forks source link

Select-all does not select wires on the boundary #875

Closed hvwyl closed 2 months ago

hvwyl commented 2 months ago

Select-all operation won't select wires on the boundary

Image_1722179532524

wawuwo commented 2 months ago

@hvwyl, hi! What version of Qucs-S do you use? Do you remember by any chance the last version without this bug? I am able to reproduce the bug in head-of-the-branch build, just need some more info to investigate the cause

hvwyl commented 2 months ago

@hvwyl, hi! What version of Qucs-S do you use? Do you remember by any chance the last version without this bug? I am able to reproduce the bug in head-of-the-branch build, just need some more info to investigate the cause

I have fixed it by changing the properties of QMargins in qucs_actions.cpp. Although this may not the best solution.

1

wawuwo commented 2 months ago

@hvwyl I've found the exact place where this bug was introduced, it's the 8c584fc4. In that commit I used QRect.bottom() and QRect.right() to pass bounds of selection rectangle, but these methods return a value which is smaller than the actual one by one unit (here and here).

I've opened PR #878, it doesn't directly address this bug, but should fix the problem (at least it did while I was testing it).

ra3xdh commented 2 months ago

Fixed by #878