summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-05-05 02:28:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-05-05 02:28:03 +0200
commit4d7572928fd57ea38ff614143176a330ec7bdb46 (patch)
treec19218d288915fe5ac47933421b965bd4d56bb39
parent99e4764890c8e65a846ffa9e6e96ce576c085d51 (diff)
opentrack: kill show()/setVisible() confusion
-rw-r--r--opentrack/main-window.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp
index 12433020..139795d5 100644
--- a/opentrack/main-window.cpp
+++ b/opentrack/main-window.cpp
@@ -48,13 +48,7 @@ main_window::main_window() : State(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH)
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
adjustSize();
- if (!start_in_tray())
- {
- setVisible(true);
- show();
- }
- else
- setVisible(false);
+ setVisible(!start_in_tray());
connect(&pose_update_timer, &QTimer::timeout,
this, &main_window::show_pose, Qt::DirectConnection);
@@ -722,7 +716,6 @@ void main_window::ensure_tray()
if (!isVisible())
{
show();
- setVisible(true);
#ifdef __APPLE__
raise(); // for OSX