mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 07:00:06 +00:00 
			
		
		
		
	Revert "save alert dock's visibility on exit"
This reverts commit 3ab18392b3.
			
			
This commit is contained in:
		
							parent
							
								
									bc62236351
								
							
						
					
					
						commit
						a94dc82c1f
					
				
					 4 changed files with 1 additions and 20 deletions
				
			
		|  | @ -281,6 +281,7 @@ MainWindow::MainWindow(QWidget* parent) : | ||||||
|    // Configure Alert Dock
 |    // Configure Alert Dock
 | ||||||
|    bool alertDockVisible_ = uiSettings.alert_dock_visible().GetValue(); |    bool alertDockVisible_ = uiSettings.alert_dock_visible().GetValue(); | ||||||
|    p->alertDockWidget_ = new ui::AlertDockWidget(this); |    p->alertDockWidget_ = new ui::AlertDockWidget(this); | ||||||
|  |    p->alertDockWidget_->setVisible(false); | ||||||
|    addDockWidget(Qt::BottomDockWidgetArea, p->alertDockWidget_); |    addDockWidget(Qt::BottomDockWidgetArea, p->alertDockWidget_); | ||||||
|    p->alertDockWidget_->setVisible(alertDockVisible_); |    p->alertDockWidget_->setVisible(alertDockVisible_); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -19,7 +19,6 @@ public: | ||||||
|       level3ProductsExpanded_.SetDefault(true); |       level3ProductsExpanded_.SetDefault(true); | ||||||
|       mapSettingsExpanded_.SetDefault(true); |       mapSettingsExpanded_.SetDefault(true); | ||||||
|       timelineExpanded_.SetDefault(true); |       timelineExpanded_.SetDefault(true); | ||||||
|       alertDockVisible_.SetDefault(false); |  | ||||||
|       radarToolboxDockVisible_.SetDefault(true); |       radarToolboxDockVisible_.SetDefault(true); | ||||||
|       mainUIState_.SetDefault(""); |       mainUIState_.SetDefault(""); | ||||||
|    } |    } | ||||||
|  | @ -31,7 +30,6 @@ public: | ||||||
|    SettingsVariable<bool> level3ProductsExpanded_ {"level3_products_expanded"}; |    SettingsVariable<bool> level3ProductsExpanded_ {"level3_products_expanded"}; | ||||||
|    SettingsVariable<bool> mapSettingsExpanded_ {"map_settings_expanded"}; |    SettingsVariable<bool> mapSettingsExpanded_ {"map_settings_expanded"}; | ||||||
|    SettingsVariable<bool> timelineExpanded_ {"timeline_expanded"}; |    SettingsVariable<bool> timelineExpanded_ {"timeline_expanded"}; | ||||||
|    SettingsVariable<bool> alertDockVisible_ {"alert_dock_visible"}; |  | ||||||
|    SettingsVariable<bool> radarToolboxDockVisible_ {"radar_toolbox_dock_visible"}; |    SettingsVariable<bool> radarToolboxDockVisible_ {"radar_toolbox_dock_visible"}; | ||||||
|    SettingsVariable<std::string> mainUIState_ {"main_ui_state"}; |    SettingsVariable<std::string> mainUIState_ {"main_ui_state"}; | ||||||
| }; | }; | ||||||
|  | @ -44,7 +42,6 @@ UiSettings::UiSettings() : | ||||||
|                       &p->level3ProductsExpanded_, |                       &p->level3ProductsExpanded_, | ||||||
|                       &p->mapSettingsExpanded_, |                       &p->mapSettingsExpanded_, | ||||||
|                       &p->timelineExpanded_, |                       &p->timelineExpanded_, | ||||||
|                       &p->alertDockVisible_, |  | ||||||
|                       &p->radarToolboxDockVisible_, |                       &p->radarToolboxDockVisible_, | ||||||
|                       &p->mainUIState_}); |                       &p->mainUIState_}); | ||||||
|    SetDefaults(); |    SetDefaults(); | ||||||
|  | @ -79,10 +76,6 @@ SettingsVariable<bool>& UiSettings::timeline_expanded() const | ||||||
|    return p->timelineExpanded_; |    return p->timelineExpanded_; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| SettingsVariable<bool>& UiSettings::alert_dock_visible() const |  | ||||||
| { |  | ||||||
|    return p->alertDockVisible_; |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| SettingsVariable<bool>& UiSettings::radar_toolbox_dock_visible() const | SettingsVariable<bool>& UiSettings::radar_toolbox_dock_visible() const | ||||||
| { | { | ||||||
|  | @ -105,7 +98,6 @@ bool UiSettings::Shutdown() | ||||||
|    dataChanged |= p->level3ProductsExpanded_.Commit(); |    dataChanged |= p->level3ProductsExpanded_.Commit(); | ||||||
|    dataChanged |= p->mapSettingsExpanded_.Commit(); |    dataChanged |= p->mapSettingsExpanded_.Commit(); | ||||||
|    dataChanged |= p->timelineExpanded_.Commit(); |    dataChanged |= p->timelineExpanded_.Commit(); | ||||||
|    dataChanged |= p->alertDockVisible_.Commit(); |  | ||||||
|    dataChanged |= p->radarToolboxDockVisible_.Commit(); |    dataChanged |= p->radarToolboxDockVisible_.Commit(); | ||||||
|    dataChanged |= p->mainUIState_.Commit(); |    dataChanged |= p->mainUIState_.Commit(); | ||||||
| 
 | 
 | ||||||
|  | @ -125,7 +117,6 @@ bool operator==(const UiSettings& lhs, const UiSettings& rhs) | ||||||
|            lhs.p->level3ProductsExpanded_ == rhs.p->level3ProductsExpanded_ && |            lhs.p->level3ProductsExpanded_ == rhs.p->level3ProductsExpanded_ && | ||||||
|            lhs.p->mapSettingsExpanded_ == rhs.p->mapSettingsExpanded_ && |            lhs.p->mapSettingsExpanded_ == rhs.p->mapSettingsExpanded_ && | ||||||
|            lhs.p->timelineExpanded_ == rhs.p->timelineExpanded_ && |            lhs.p->timelineExpanded_ == rhs.p->timelineExpanded_ && | ||||||
|            lhs.p->alertDockVisible_ == rhs.p->alertDockVisible_ && |  | ||||||
|            lhs.p->radarToolboxDockVisible_ == rhs.p->radarToolboxDockVisible_ && |            lhs.p->radarToolboxDockVisible_ == rhs.p->radarToolboxDockVisible_ && | ||||||
|            lhs.p->mainUIState_ == rhs.p->mainUIState_); |            lhs.p->mainUIState_ == rhs.p->mainUIState_); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -32,7 +32,6 @@ public: | ||||||
|    SettingsVariable<bool>& level3_products_expanded() const; |    SettingsVariable<bool>& level3_products_expanded() const; | ||||||
|    SettingsVariable<bool>& map_settings_expanded() const; |    SettingsVariable<bool>& map_settings_expanded() const; | ||||||
|    SettingsVariable<bool>& timeline_expanded() const; |    SettingsVariable<bool>& timeline_expanded() const; | ||||||
|    SettingsVariable<bool>& alert_dock_visible() const; |  | ||||||
|    SettingsVariable<bool>& radar_toolbox_dock_visible() const; |    SettingsVariable<bool>& radar_toolbox_dock_visible() const; | ||||||
|    SettingsVariable<std::string>& main_ui_state() const; |    SettingsVariable<std::string>& main_ui_state() const; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,7 +5,6 @@ | ||||||
| #include <scwx/qt/model/alert_model.hpp> | #include <scwx/qt/model/alert_model.hpp> | ||||||
| #include <scwx/qt/model/alert_proxy_model.hpp> | #include <scwx/qt/model/alert_proxy_model.hpp> | ||||||
| #include <scwx/qt/settings/general_settings.hpp> | #include <scwx/qt/settings/general_settings.hpp> | ||||||
| #include <scwx/qt/settings/ui_settings.hpp> |  | ||||||
| #include <scwx/qt/types/alert_types.hpp> | #include <scwx/qt/types/alert_types.hpp> | ||||||
| #include <scwx/qt/types/qt_types.hpp> | #include <scwx/qt/types/qt_types.hpp> | ||||||
| #include <scwx/qt/ui/alert_dialog.hpp> | #include <scwx/qt/ui/alert_dialog.hpp> | ||||||
|  | @ -82,15 +81,6 @@ AlertDockWidget::AlertDockWidget(QWidget* parent) : | ||||||
| 
 | 
 | ||||||
|    // Check Active Alerts and trigger signal
 |    // Check Active Alerts and trigger signal
 | ||||||
|    ui->actionActiveAlerts->setChecked(true); |    ui->actionActiveAlerts->setChecked(true); | ||||||
| 
 |  | ||||||
|    // Update setting on visiblity change.
 |  | ||||||
|    connect(toggleViewAction(), |  | ||||||
|            &QAction::triggered, |  | ||||||
|            this, |  | ||||||
|            [](bool checked) { |  | ||||||
|               settings::UiSettings::Instance().alert_dock_visible().StageValue( |  | ||||||
|                  checked); |  | ||||||
|            }); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| AlertDockWidget::~AlertDockWidget() | AlertDockWidget::~AlertDockWidget() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak