mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0029140: Samples - Viewer is not updated in MFC Modeling and Viewer3D samples
OCC_3dBaseDoc::OnUpdateObjectDisplayall() - allow re-displaying hidden presentation of non-Shape types. OCC_3dBaseDoc::OnObjectErase() - removed redundant call AIS_InteractiveContext::ClearSelected(). CModelingDoc::OnFuse(),::OnCommon(),::OnExplorer() - removed redundant viewer updates and add missing ones.
This commit is contained in:
@@ -292,8 +292,7 @@ void OCC_3dBaseDoc::OnUpdateObjectColor(CCmdUI* pCmdUI)
|
||||
|
||||
void OCC_3dBaseDoc::OnObjectErase()
|
||||
{
|
||||
myAISContext->EraseSelected (Standard_False);
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
myAISContext->EraseSelected (Standard_True);
|
||||
}
|
||||
void OCC_3dBaseDoc::OnUpdateObjectErase(CCmdUI* pCmdUI)
|
||||
{
|
||||
@@ -406,17 +405,17 @@ void OCC_3dBaseDoc::OnObjectDisplayall()
|
||||
|
||||
void OCC_3dBaseDoc::OnUpdateObjectDisplayall(CCmdUI* pCmdUI)
|
||||
{
|
||||
|
||||
AIS_ListOfInteractive aList;
|
||||
myAISContext->ObjectsInside(aList,AIS_KOI_Shape);
|
||||
AIS_ListIteratorOfListOfInteractive aLI;
|
||||
Standard_Boolean IS_ANY_OBJECT_ERASED=FALSE;
|
||||
for (aLI.Initialize(aList);aLI.More();aLI.Next()){
|
||||
if(!myAISContext->IsDisplayed(aLI.Value()))
|
||||
IS_ANY_OBJECT_ERASED=TRUE;
|
||||
}
|
||||
pCmdUI->Enable (IS_ANY_OBJECT_ERASED);
|
||||
|
||||
AIS_ListOfInteractive aList;
|
||||
myAISContext->ObjectsInside (aList);
|
||||
for (AIS_ListIteratorOfListOfInteractive aLI (aList);aLI.More();aLI.Next())
|
||||
{
|
||||
if (!myAISContext->IsDisplayed (aLI.Value()))
|
||||
{
|
||||
pCmdUI->Enable (true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
pCmdUI->Enable (false);
|
||||
}
|
||||
|
||||
void OCC_3dBaseDoc::OnObjectRemove()
|
||||
|
Reference in New Issue
Block a user