From f8a4d27e54eca9365b1b47a149934ae4acfbb1a8 Mon Sep 17 00:00:00 2001
From: Alexander Bus <busfromrus@gmail.com>
Date: Sun, 14 Jan 2018 04:52:37 +0700
Subject: [PATCH] Small fix

---
 cutelog/listener.py    | 4 +++-
 cutelog/main_window.py | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/cutelog/listener.py b/cutelog/listener.py
index 9ac9ad3..4638ee7 100644
--- a/cutelog/listener.py
+++ b/cutelog/listener.py
@@ -151,7 +151,8 @@ class BenchmarkConnection(LogConnection):
     def run(self):
         test_levels = [(10, 'DEBUG'), (20, 'INFO'), (30, 'WARNING'),
                        (40, 'ERROR'), (50, 'CRITICAL'), (21, 'REQ')]
-        d = {'args': None,  # dummy log item
+        # dummy log item
+        d = {'args': None,
              'created': 0,
              'exc_info': None,
              'exc_text': 'exception test',
@@ -186,3 +187,4 @@ class BenchmarkConnection(LogConnection):
             self.new_record.emit(r)
             c += 1
             time.sleep(CONFIG.benchmark_interval)
+        self.connection_finished.emit(self)
diff --git a/cutelog/main_window.py b/cutelog/main_window.py
index 596b7d3..73646b8 100644
--- a/cutelog/main_window.py
+++ b/cutelog/main_window.py
@@ -349,6 +349,7 @@ class MainWindow(*MainWindowBase):
                     conn.new_record.disconnect(src_logger.on_record)
                     conn.connection_finished.disconnect(src_logger.remove_connection)
                     conn.new_record.connect(dst_logger.on_record)
+                    dst_logger.add_connection(conn)
                 src_logger.connections.clear()
             self.destroy_logger(src_logger)
 
-- 
GitLab