Manually simplify bool expressions and fix rtgui/progressconnector.h

This commit is contained in:
Flössie
2016-10-18 18:30:25 +02:00
parent ae98d4cb1f
commit fb8941cd88
3 changed files with 6 additions and 4 deletions

View File

@@ -1968,11 +1968,12 @@ void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & his
bool EditorPanel::CheckSidePanelsVisibility() bool EditorPanel::CheckSidePanelsVisibility()
{ {
if (tbTopPanel_1) { if (tbTopPanel_1) {
return !(!tbTopPanel_1->get_active() && !tbRightPanel_1->get_active() && !hidehp->get_active()); return tbTopPanel_1->get_active() || tbRightPanel_1->get_active() || hidehp->get_active();
} }
return !(!tbRightPanel_1->get_active() && !hidehp->get_active()); return tbRightPanel_1->get_active() || hidehp->get_active();
} }
void EditorPanel::toggleSidePanels() void EditorPanel::toggleSidePanels()
{ {
// Maximize preview panel: // Maximize preview panel:

View File

@@ -2123,8 +2123,9 @@ void FileCatalog::tbRightPanel_1_toggled ()
bool FileCatalog::CheckSidePanelsVisibility() bool FileCatalog::CheckSidePanelsVisibility()
{ {
return !(!tbLeftPanel_1->get_active() && !tbRightPanel_1->get_active()); return tbLeftPanel_1->get_active() || tbRightPanel_1->get_active();
} }
void FileCatalog::toggleSidePanels() void FileCatalog::toggleSidePanels()
{ {
// toggle left AND right panels // toggle left AND right panels

View File

@@ -90,7 +90,7 @@ class ProgressConnector
public: public:
ProgressConnector (): retval( nullptr ), workThread( nullptr ) { } ProgressConnector (): retval( 0 ), workThread( nullptr ) { }
void startFunc (const sigc::slot0<T>& startHandler, const sigc::slot0<bool>& endHandler ) void startFunc (const sigc::slot0<T>& startHandler, const sigc::slot0<bool>& endHandler )
{ {