From acc87700da44d8a78f7bce69247fac30288a7d29 Mon Sep 17 00:00:00 2001 From: Natalia ERMOLAEVA Date: Sat, 11 Apr 2020 21:11:37 +0300 Subject: [PATCH] 0029451: Information Message Alert to debug an algorithm or object functionality --- tools/MessageModel/MessageModel_ItemAlert.hxx | 2 +- tools/MessageView/MessageView_Window.cxx | 18 +++--------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/tools/MessageModel/MessageModel_ItemAlert.hxx b/tools/MessageModel/MessageModel_ItemAlert.hxx index c07fbf5e58..c9b5d0b781 100644 --- a/tools/MessageModel/MessageModel_ItemAlert.hxx +++ b/tools/MessageModel/MessageModel_ItemAlert.hxx @@ -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& thePresentations) Standard_OVERRIDE - { thePresentations.Append (myPresentation); } + { TreeModel_ItemBase::Presentations (thePresentations); thePresentations.Append (myPresentation); } ////! Returns summ of children alert elapsed times. The method is recusive. diff --git a/tools/MessageView/MessageView_Window.cxx b/tools/MessageView/MessageView_Window.cxx index ac6e0d063b..aaa2c61dd2 100644 --- a/tools/MessageView/MessageView_Window.cxx +++ b/tools/MessageView/MessageView_Window.cxx @@ -32,7 +32,6 @@ #include #include -#include #include #include @@ -739,7 +738,7 @@ void MessageView_Window::onPreviewChildren() NCollection_List 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(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 (myTreeView->model()); - const NCollection_List& aReports = aViewModel->Reports(); NCollection_Map anActiveMetrics; for (NCollection_List::Iterator anIterator (aViewModel->Reports()); anIterator.More(); anIterator.Next()) -- 2.39.5