]> OCCT Git - occt-copy.git/commitdiff
0031959: Inspectors - Statistics by name CR0_DMUReviewer_IR-2019-08-30_CR31959
authorsshutina <sshutina@opencascade.com>
Wed, 23 Dec 2020 06:19:01 +0000 (09:19 +0300)
committersshutina <sshutina@opencascade.com>
Wed, 23 Dec 2020 06:19:01 +0000 (09:19 +0300)
src/Message/Message_Report.cxx

index 9edb2c6a4d99277898020aba1b3d6698351bb4ff..15cbe29442795656146fd1ba68daade7d4816007 100644 (file)
@@ -227,10 +227,9 @@ void Message_Report::RemoveLevel (Message_Level* theLevel)
   for (int aLevelIndex = myAlertLevels.Size(); aLevelIndex >= 1; aLevelIndex--)
   {
     Message_Level* aLevel = myAlertLevels.Value (aLevelIndex);
-    if (myAlertLevels.Size() == 1) // the last level, the root item should be stopped
-    {
-      Message_AttributeMeter::StopAlert (aLevel->RootAlert());
-    }
+    // The last level, the root item should be stopped always
+    // as AddLevel necessarily creates the root label.
+    Message_AttributeMeter::StopAlert (aLevel->RootAlert());
 
     myAlertLevels.Remove (aLevelIndex);
     if (aLevel == theLevel)