]> OCCT Git - occt-copy.git/commitdiff
0029451: Information Message Alert to debug an algorithm or object functionality
authorNatalia ERMOLAEVA <nds@nnov.opencascade.com>
Sat, 11 Apr 2020 18:11:37 +0000 (21:11 +0300)
committerNatalia ERMOLAEVA <nds@nnov.opencascade.com>
Sat, 11 Apr 2020 18:21:56 +0000 (21:21 +0300)
tools/MessageModel/MessageModel_ItemAlert.hxx
tools/MessageView/MessageView_Window.cxx

index c07fbf5e5817d680e63b4eec7c1589af719f5c99..c9b5d0b781ff8ec4538458608a1c0035d1f2690e 100644 (file)
@@ -92,7 +92,7 @@ public:
   //! \param theColumn a model index column
   //! \thePresentations [out] container of presentation handles to be visualized
   virtual void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations) Standard_OVERRIDE
-  { thePresentations.Append (myPresentation); }
+  { TreeModel_ItemBase::Presentations (thePresentations); thePresentations.Append (myPresentation); }
 
 
   ////! Returns summ of children alert elapsed times. The method is recusive.
index ac6e0d063b74e540ce6f9e985b55dbfcdce01161..aaa2c61dd2e8b97ed7b56204720ebc416c71a6b3 100644 (file)
@@ -32,7 +32,6 @@
 #include <inspector/ViewControl_TreeView.hxx>
 #include <inspector/Convert_Tools.hxx>
 
-#include <inspector/View_DisplayPreview.hxx>
 #include <inspector/View_Viewer.hxx>
 #include <inspector/View_Widget.hxx>
 
@@ -739,7 +738,7 @@ void MessageView_Window::onPreviewChildren()
   NCollection_List<Handle(Standard_Transient)> aPresentations;
   TreeModel_ModelBase::SubItemsPresentations (aSelectedIndices, aPresentations);
 
-  displayer()->DisplayPreview()->UpdatePreview (View_DisplayActionType_DisplayId, aPresentations, myViewWindow->ViewWidget()->DisplayMode());
+  displayer()->UpdatePreview (View_DisplayActionType_DisplayId, aPresentations);
 }
 
 // =======================================================================
@@ -871,20 +870,10 @@ void MessageView_Window::updatePreviewPresentation()
     if (!anItemBase)
       continue;
 
-    Handle(TreeModel_ItemProperties) anItemProperties = anItemBase->Properties();
-    if (anItemProperties)
-    {
-      anItemProperties->Presentations (aPresentations);
-    }
-
-    MessageModel_ItemAlertPtr anAlertItem = itemDynamicCast<MessageModel_ItemAlert>(anItemBase);
-    if (anAlertItem)
-    {
-      anAlertItem->Presentations (aPresentations);
-    }
+    anItemBase->Presentations (aPresentations);
   }
 
-  displayer()->DisplayPreview()->UpdatePreview (View_DisplayActionType_DisplayId, aPresentations, myViewWindow->ViewWidget()->DisplayMode());
+  displayer()->UpdatePreview (View_DisplayActionType_DisplayId, aPresentations);
 }
 
 // =======================================================================
@@ -894,7 +883,6 @@ void MessageView_Window::updatePreviewPresentation()
 void MessageView_Window::updateVisibleColumns()
 {
   MessageModel_TreeModel* aViewModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
-  const NCollection_List<MessageModel_ReportInformation>& aReports = aViewModel->Reports();
 
   NCollection_Map<Message_MetricType> anActiveMetrics;
   for (NCollection_List<MessageModel_ReportInformation>::Iterator anIterator (aViewModel->Reports()); anIterator.More(); anIterator.Next())