From 579444bf44a4f60d5e1d1f06d54f34a4cc9a260d Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 1 Mar 2013 09:13:22 +0000 Subject: [PATCH] Add option to show/hide transport bar --- resources/ui/carla.ui | 44 +++++++++++++++++++++++++++++++++++-------- source/carla.py | 5 +++++ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/resources/ui/carla.ui b/resources/ui/carla.ui index c76969b62..c9ae75dd3 100644 --- a/resources/ui/carla.ui +++ b/resources/ui/carla.ui @@ -227,14 +227,6 @@ - - - &Settings - - - - - &Engine @@ -244,6 +236,15 @@ + + + &Settings + + + + + + @@ -402,6 +403,17 @@ Configure Driver + + + true + + + Show Transport bar + + + Show Transport bar + + @@ -439,5 +451,21 @@ + + act_settings_show_transport + triggered(bool) + frame_transport + setVisible(bool) + + + -1 + -1 + + + 377 + 65 + + + diff --git a/source/carla.py b/source/carla.py index 410a73377..115749dab 100755 --- a/source/carla.py +++ b/source/carla.py @@ -1161,6 +1161,7 @@ class CarlaMainW(QMainWindow): settings = QSettings() settings.setValue("Geometry", self.saveGeometry()) settings.setValue("ShowToolbar", self.ui.toolBar.isVisible()) + settings.setValue("ShowTransport", self.ui.frame_transport.isVisible()) def loadSettings(self, geometry): settings = QSettings() @@ -1172,6 +1173,10 @@ class CarlaMainW(QMainWindow): self.ui.act_settings_show_toolbar.setChecked(showToolbar) self.ui.toolBar.setVisible(showToolbar) + showTransport = settings.value("ShowTransport", True, type=bool) + self.ui.act_settings_show_transport.setChecked(showTransport) + self.ui.frame_transport.setVisible(showTransport) + self.fSavedSettings = { "Main/DefaultProjectFolder": settings.value("Main/DefaultProjectFolder", HOME, type=str), "Main/RefreshInterval": settings.value("Main/RefreshInterval", 50, type=int)