From 0a74872ea228481a05926f20ef450419b2c1daa3 Mon Sep 17 00:00:00 2001 From: Raizo62 Date: Sat, 21 Jun 2025 11:49:51 +0200 Subject: [PATCH] Clicking the "console connect to all nodes" opens all consoles in name order with case-insensitively ChatGPT : Use `sorted(nodes.keys(), key=str.casefold)` instead of simple sorted() to ensure case-insensitive ordering. Improves UX by merging uppercase and lowercase entries seamlessly. Python 3.11+ recommended approach. --- gns3/graphics_view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3/graphics_view.py b/gns3/graphics_view.py index 3bf8b703..31149b4f 100644 --- a/gns3/graphics_view.py +++ b/gns3/graphics_view.py @@ -1137,7 +1137,7 @@ class GraphicsView(QtWidgets.QGraphicsView): delay = self._main_window.settings()["delay_console_all"] counter = 0 - for name in sorted(nodes.keys()): + for name in sorted(nodes.keys(), key=str.casefold): node = nodes[name] callback = qpartial(self.consoleToNode, node) self._main_window.run_later(counter, callback) @@ -1216,7 +1216,7 @@ class GraphicsView(QtWidgets.QGraphicsView): delay = self._main_window.settings()["delay_console_all"] counter = 0 - for name in sorted(nodes.keys()): + for name in sorted(nodes.keys(), key=str.casefold): node = nodes[name] callback = qpartial(self.consoleToNode, node, aux=True) self._main_window.run_later(counter, callback)