mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-28 18:35:38 +05:00
NPAL 19561 Name of objects does not appear in the context menu of VTK viewer
This commit is contained in:
parent
0958758e5e
commit
660f03eed4
@ -3131,11 +3131,23 @@ QString SMESHGUI::engineIOR() const
|
||||
return QString( anIOR.in() );
|
||||
}
|
||||
|
||||
void SMESHGUI::contextMenuPopup( const QString& client, QPopupMenu* menu, QString& /*title*/ )
|
||||
void SMESHGUI::contextMenuPopup( const QString& client, QPopupMenu* menu, QString& title )
|
||||
{
|
||||
SMESHGUI_Selection sel;
|
||||
sel.init( client, selectionMgr() );
|
||||
popupMgr()->updatePopup( menu, &sel );
|
||||
|
||||
SalomeApp_Module::contextMenuPopup( client, menu, title );
|
||||
SALOME_ListIO lst;
|
||||
getApp()->selectionMgr()->selectedObjects( lst );
|
||||
if ( ( client == "OCCViewer" || client == "VTKViewer" ) && lst.Extent() == 1 ) {
|
||||
Handle(SALOME_InteractiveObject) io = lst.First();
|
||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
|
||||
_PTR(Study) study = appStudy->studyDS();
|
||||
_PTR(SObject) obj = study->FindObjectID( io->getEntry() );
|
||||
if ( obj )
|
||||
title = QString( obj->GetName().c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
void SMESHGUI::windows( QMap<int, int>& aMap ) const
|
||||
|
Loading…
Reference in New Issue
Block a user