@@ -63,7 +63,7 @@ static constexpr int GUI_UPDATE_RATE_SLOW = 120;
6363/* *
6464 * The one and only instance of COverviewManager.
6565 */
66- COverviewManager* COverviewManager::m_singleton = 0 ;
66+ COverviewManager* COverviewManager::m_singleton = nullptr ;
6767
6868/* *
6969 * Class constructor.
@@ -74,7 +74,7 @@ COverviewManager::COverviewManager()
7474 m_singleton = this ;
7575
7676 // Default overview window properties.
77- m_overview = 0 ;
77+ m_overview = nullptr ;
7878 m_overviewBounds = Rectangle<int >(50 , 50 , 500 , 500 );
7979}
8080
@@ -83,9 +83,9 @@ COverviewManager::COverviewManager()
8383 */
8484COverviewManager::~COverviewManager ()
8585{
86- jassert (m_overview == 0 );
86+ jassert (m_overview == nullptr );
8787
88- m_singleton = 0 ;
88+ m_singleton = nullptr ;
8989}
9090
9191/* *
@@ -95,7 +95,7 @@ COverviewManager::~COverviewManager()
9595 */
9696COverviewManager* COverviewManager::GetInstance ()
9797{
98- if (m_singleton == 0 )
98+ if (m_singleton == nullptr )
9999 {
100100 m_singleton = new COverviewManager ();
101101 }
@@ -108,7 +108,7 @@ COverviewManager* COverviewManager::GetInstance()
108108void COverviewManager::OpenOverview ()
109109{
110110 // Overview window is not currently open -> create it.
111- if (m_overview == 0 )
111+ if (m_overview == nullptr )
112112 {
113113 m_overview = new COverview ();
114114 m_overview->setBounds (m_overviewBounds);
@@ -131,13 +131,13 @@ void COverviewManager::OpenOverview()
131131 */
132132void COverviewManager::CloseOverview (bool destroy)
133133{
134- if (m_overview != 0 )
134+ if (m_overview != nullptr )
135135 {
136136 SaveLastOverviewBounds (GetOverviewBounds ());
137137
138138 // Close the overview window.
139139 delete m_overview;
140- m_overview = 0 ;
140+ m_overview = nullptr ;
141141 }
142142
143143 // Closed overview, so manager no longer needed.
@@ -870,21 +870,25 @@ void COverviewMultiSurface::resized()
870870 */
871871void COverviewMultiSurface::UpdateGui (bool init)
872872{
873+ // Will be set to true if any changes relevant to the multi-slider are found.
874+ bool update = init;
875+
873876 // Update the selected mapping area.
874877 int selectedMapping = 0 ;
875878 COverviewManager* ovrMgr = COverviewManager::GetInstance ();
876879 if (ovrMgr)
877880 {
878881 selectedMapping = ovrMgr->GetSelectedMapping ();
879- m_areaSelector->setSelectedId (selectedMapping);
882+ if (selectedMapping != m_areaSelector->getSelectedId ())
883+ {
884+ m_areaSelector->setSelectedId (selectedMapping, dontSendNotification);
885+ update = true ;
886+ }
880887 }
881888
882889 CController* ctrl = CController::GetInstance ();
883890 if (ctrl && m_multiSlider)
884891 {
885- // Will be set to true if any changes relevant to the multi-slider are found.
886- bool update = init;
887-
888892 if (ctrl->PopParameterChanged (DCS_Overview, DCT_NumPlugins))
889893 update = true ;
890894
@@ -1269,7 +1273,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu
12691273{
12701274 ignoreUnused (isRowSelected);
12711275
1272- Component* ret = 0 ;
1276+ Component* ret = nullptr ;
12731277
12741278 switch (columnId)
12751279 {
@@ -1279,7 +1283,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu
12791283
12801284 // If an existing component is being passed-in for updating, we'll re-use it, but
12811285 // if not, we'll have to create one.
1282- if (label == 0 )
1286+ if (label == nullptr )
12831287 label = new CEditableLabelContainer (*this );
12841288
12851289 // Ensure that the component knows which row number it is located at.
@@ -1296,7 +1300,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu
12961300
12971301 // If an existing component is being passed-in for updating, we'll re-use it, but
12981302 // if not, we'll have to create one.
1299- if (comboBox == 0 )
1303+ if (comboBox == nullptr )
13001304 comboBox = new CComboBoxContainer (*this );
13011305
13021306 // Ensure that the comboBox knows which row number it is located at.
@@ -1312,7 +1316,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu
13121316
13131317 // If an existing component is being passed-in for updating, we'll re-use it, but
13141318 // if not, we'll have to create one.
1315- if (textEdit == 0 )
1319+ if (textEdit == nullptr )
13161320 textEdit = new CTextEditorContainer (*this );
13171321
13181322 // Ensure that the component knows which row number it is located at.
@@ -1329,7 +1333,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu
13291333
13301334 // If an existing component is being passed-in for updating, we'll re-use it, but
13311335 // if not, we'll have to create one.
1332- if (radioButton == 0 )
1336+ if (radioButton == nullptr )
13331337 radioButton = new CRadioButtonContainer (*this );
13341338
13351339 // Ensure that the component knows which row number it is located at.
@@ -1341,7 +1345,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu
13411345 break ;
13421346
13431347 default :
1344- jassert (existingComponentToUpdate == 0 );
1348+ jassert (existingComponentToUpdate == nullptr );
13451349 break ;
13461350 }
13471351
0 commit comments