From fa391c664b761c854c8f1a4c5fbeb40ce07d606e Mon Sep 17 00:00:00 2001 From: kyrpasto Date: Tue, 24 Sep 2019 13:53:26 +0200 Subject: [PATCH] Do not reload subtitle when the window is maximized --- src/bdsup2sub.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bdsup2sub.cpp b/src/bdsup2sub.cpp index 6188c93..b5cb707 100644 --- a/src/bdsup2sub.cpp +++ b/src/bdsup2sub.cpp @@ -318,13 +318,15 @@ void BDSup2Sub::dropEvent(QDropEvent *event) void BDSup2Sub::showEvent(QShowEvent *event) { + bool first_load = false; QMainWindow::showEvent(event); if (settings == 0) { loadSettings(); + first_load = true; + init(); } - init(); - if (fromCLI && !loadPath.isEmpty()) + if (fromCLI && !loadPath.isEmpty() && first_load) { if (!QFile(loadPath).exists()) {