GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.17k stars 436 forks source link

Drawing items rotation enhancement #3619

Open braza2004 opened 3 months ago

braza2004 commented 3 months ago

I have noticed that drawing items such as lines, rectangles etc. do not rotate about their center, rather, they rotate about a corner. This makes rotating items inconvenient as you have to reposition them every time you rotate them. I was hoping someone could inform me of the where abouts of the target function and file in the code base and ill fix it myself; I tried to find it but couldn't.

grossmj commented 3 months ago

The rotation itself is handled by Qt. In GNS3 we call the setRotation() method on QGraphicsItem: https://doc.qt.io/qt-5/qgraphicsitem.html#setRotation

braza2004 commented 3 months ago

I see, let me see if I can manually adjust the position every time the setRotation() function is called. Also it would be really helpful if you could share your email with me, I have something important to discuss.