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

Unable to edit text labels of topology items due to TypeError #3285

Closed
bpozdena opened this issue Jan 20, 2022 · 2 comments
Closed

Unable to edit text labels of topology items due to TypeError #3285

bpozdena opened this issue Jan 20, 2022 · 2 comments
Labels

Comments

@bpozdena
Copy link

bpozdena commented Jan 20, 2022

Describe the bug
I noticed is not possible to edit text labels in the topology due to unexpected value type for item rotation.

Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/gns3/graphics_view.py", line 1444, in textEditActionSlot text_edit_dialog = TextEditorDialog(self._main_window, items) File "/usr/lib/python3.10/site-packages/gns3/dialogs/text_editor_dialog.py", line 47, in __init__ self.uiRotationSpinBox.setValue(first_item.rotation()) TypeError: setValue(self, int): argument 1 has unexpected type 'float'

I do not understand where the float is coming from as based on the GUI debug, the rotation is clearly set to int 0.
Event received from project stream: {'action': 'drawing.updated', 'event': {'drawing_id': '7763da28-5633-4e37-bb85-0eb609dc7b47', 'locked': False, 'project_id': '3931151b-c400-445c-9d38-de734874ea08', 'rotation': 0, 'x': -247, 'y': -64, 'z': 2}}

GNS3 version and operating system (please complete the following information):

  • OS: Linux Manjaro - KDE
  • GNS3-GUI: 2.2.29

To Reproduce

  1. Right-click on any text label in topology in new or preexisting topology
  2. Click on 'Text Edit'

Screenshots or videos
image

Additional context
A quick workaround I found was to change:

self.uiRotationSpinBox.setValue(first_item.rotation())

to:
self.uiRotationSpinBox.setValue(int(first_item.rotation()))

@bpozdena bpozdena added the Bug label Jan 20, 2022
@cristian-ciobanu
Copy link

This issue has been reported already here: #3281 and has been fixed. It will be available when the GNS3 team will release version 2.2.30.

@bpozdena
Copy link
Author

Sorry, It did not occur to me to search in closed issues. Thanks @cristian-ciobanu .

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

No branches or pull requests

2 participants