From b98129cefeb58cfd2c7d25e6fc069a20559066f8 Mon Sep 17 00:00:00 2001 From: asv Date: Tue, 13 Sep 2005 13:24:39 +0000 Subject: [PATCH] Fix for a bug: if ViewModel does not support Trihedron in its views, then a corresponding Action is not created in createActions(). BUT it was used without checking in the next function - createToolBar(). Added a check for myModel->trihedronActivated() to createToolBar(). --- src/OCCViewer/OCCViewer_ViewWindow.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 0351deacd..ce71067ef 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -668,8 +668,9 @@ void OCCViewer_ViewWindow::createActions() //**************************************************************** void OCCViewer_ViewWindow::createToolBar() { - myActionsMap[DumpId]->addTo(myToolBar); - myActionsMap[TrihedronShowId]->addTo(myToolBar); + myActionsMap[DumpId]->addTo(myToolBar); + if ( myModel->trihedronActivated() ) + myActionsMap[TrihedronShowId]->addTo(myToolBar); SUIT_ToolButton* aScaleBtn = new SUIT_ToolButton(myToolBar, "scale"); aScaleBtn->AddAction(myActionsMap[FitAllId]); -- 2.39.2