Fix for '23552: Unable to use the contextual menu of Object Browser window' issue: do not show 'Materials' submenu forcibly

This commit is contained in:
rnv 2018-05-29 16:47:07 +03:00
parent cba0e188be
commit 1a7ecb9452

View File

@ -2266,7 +2266,11 @@ void GeometryGUI::contextMenuPopup( const QString& client, QMenu* menu, QString&
getApp()->selectionMgr()->selectedObjects( lst ); getApp()->selectionMgr()->selectedObjects( lst );
//Add submenu for predefined materials //Add submenu for predefined materials
bool isPredefMat = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "predef_materials" ); // RNV: '#23552: Unable to use the contextual menu of Object Browser window' issue:
// Temporary solution: do not show 'Materials' submenu forcibly
//bool isPredefMat = SUIT_Session::session()->resourceMgr()->booleanValue( "Geometry", "predef_materials" );
bool isPredefMat = false;
if ( ( client == "OCCViewer" || client == "VTKViewer" ) && lst.Extent() > 0 ) { if ( ( client == "OCCViewer" || client == "VTKViewer" ) && lst.Extent() > 0 ) {
QtxPopupMgr* mgr = popupMgr(); QtxPopupMgr* mgr = popupMgr();
//get parrent for submenu //get parrent for submenu
@ -2386,7 +2390,7 @@ void GeometryGUI::createPreferences()
int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup, int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup,
LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" ); LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" );
// Temporary hide this preference, because of the '#23552: Unable to use the contextual menu of Object Browser window' issue // RNV: Temporary hide this preference, because of the '#23552: Unable to use the contextual menu of Object Browser window' issue
//addPreference( tr( "PREF_PREDEF_MATERIALS" ), genGroup, //addPreference( tr( "PREF_PREDEF_MATERIALS" ), genGroup,
// LightApp_Preferences::Bool, "Geometry", "predef_materials" ); // LightApp_Preferences::Bool, "Geometry", "predef_materials" );