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

X Y coordinate tool tip doesn't stay active long enough #3561

Closed
spikefishjohn opened this issue Jan 20, 2024 · 4 comments
Closed

X Y coordinate tool tip doesn't stay active long enough #3561

spikefishjohn opened this issue Jan 20, 2024 · 4 comments
Assignees

Comments

@spikefishjohn
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When you hover over something on the map the X Y coordinates will show on the lower left of the screen for about a second then disappear.

Describe the solution you'd like
It would be nice if the tool tip didn't disappear until no longer hovering or just waited much longer before disappearing.
image

@ghost
Copy link

ghost commented Jan 23, 2024

That's quite easy. Change the timeout in gns3/graphics_view.py line 643 to a higher value, for example to 5000 (5 seconds):

--- a/gns3/graphics_view.py
+++ b/gns3/graphics_view.py
@@ -640,7 +640,7 @@ class GraphicsView(QtWidgets.QGraphicsView):
             if item:
                 # show item coords in the status bar
                 coords = "X: {} Y: {} Z: {}".format(item.x(), item.y(), item.zValue())
-                self._main_window.uiStatusBar.showMessage(coords, 2000)
+                self._main_window.uiStatusBar.showMessage(coords, 5000)
 
             # force the children to redraw because of a problem with QGraphicsEffect
             for item in self.scene().selectedItems():

But when doing this, I suggest to change the timeouts of the other uiStatusBar messages also to the same value to keep a consistent user interface.

@spikefishjohn
Copy link
Contributor Author

Ok so stupid question. Why time it out in the first place? Do other things show up in that field (haven't poked around graphics_view yet. Still going OCD on the telnetlib issue.

If nothing else is writing to there, would it not be better to just keep it there until something else writes to it?

Side note. It would be nice if you could copy x/y to copy/paste buffer somehow. Not sure if that is right click get coords or whatever. Moving the mouse to that window seems too prone to error (mousing over a different node as your getting there).

grossmj added a commit that referenced this issue Feb 12, 2024
The coordinates message has no timeout and can be reset when clicking on the scene. Ref #3561
@grossmj
Copy link
Member

grossmj commented Feb 12, 2024

I have increased all timeouts to 5 seconds excepting for the coordinate messages. The status bar message can be reset when clicking on the scene.

Side note. It would be nice if you could copy x/y to copy/paste buffer somehow. Not sure if that is right click get coords or whatever. Moving the mouse to that window seems too prone to error (mousing over a different node as your getting there).

The easiest would be to add a shortcut (something like CTRL+ something) that would copy the current status bar message to the clipboard. Would that be enough for you?

@grossmj
Copy link
Member

grossmj commented Feb 14, 2024

I've added the CTRL+C shortcut, this will copy the content of the status bar to the clipboard. Let me know if you want an alternative shortcut. Thanks 👍

@grossmj grossmj closed this as completed Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants