]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1885
authorisn <isn@opencascade.com>
Mon, 25 Mar 2019 15:35:34 +0000 (18:35 +0300)
committerisn <isn@opencascade.com>
Mon, 25 Mar 2019 15:36:40 +0000 (18:36 +0300)
src/HYDROGUI/HYDROGUI_StreamOp.cxx

index 74835af2d009779e4aed792d47735c9cd0cb7806..14db0d12a1695cfa4fdadfb095c37e331b9e9bee 100755 (executable)
@@ -518,21 +518,28 @@ void HYDROGUI_StreamOp::createPreview()
     if (!ProjStat)
       aPanel->addWarning(tr("STREAM_PROJECTION_FAILED"));
 
+    QVector<QString> warningsStr;
+
     for (NCollection_DataMap<Handle(HYDROData_Profile), QSet<QString>>::Iterator it(warnings); it.More(); it.Next())
     {
-      const QSet<QString>& V = it.Value();
+      QSet<QString> V = it.Value();
       if (V.empty())
-        continue;
+        continue;   
       const Handle(HYDROData_Profile)& K = it.Key();
       QString ProfName = K->GetName();
       foreach (QString str, V)
       {
-        aPanel->addWarning("Profile: " + ProfName + ":  " + str);    
+        warningsStr.append(ProfName + ":  " + str);
+        //aPanel->addWarning(ProfName + ":  " + str);    
       }
 
       aPanel->setBackgroundColorForProfileList(ProfName, QColor(Qt::yellow));
     }
 
+    std::sort(warningsStr.begin(), warningsStr.end());
+    for (int k=0;k<warningsStr.size();k++)
+      aPanel->addWarning(warningsStr[k]);
+
     myPreviewPrs->setShape( aPrsDef.myPrs2D );
   }
   else //mode == 1