mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Release 2023.06
This commit is contained in:
@@ -46,13 +46,12 @@ void RicNewCustomObjectiveFunctionFeature::onActionTriggered( bool isChecked )
|
||||
caf::PdmObject* selObj = dynamic_cast<caf::PdmObject*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
if ( !selObj ) return;
|
||||
|
||||
std::vector<RimCustomObjectiveFunctionCollection*> coll;
|
||||
selObj->descendantsIncludingThisOfType( coll );
|
||||
std::vector<RimCustomObjectiveFunctionCollection*> coll = selObj->descendantsIncludingThisOfType<RimCustomObjectiveFunctionCollection>();
|
||||
|
||||
if ( coll.size() == 1 )
|
||||
{
|
||||
RimCustomObjectiveFunction* newFunc = coll[0]->addObjectiveFunction();
|
||||
RimCustomObjectiveFunctionWeight* newWeight = RimObjectiveFunctionTools::addWeight( newFunc );
|
||||
RimCustomObjectiveFunction* newFunc = coll[0]->addObjectiveFunction();
|
||||
RimObjectiveFunctionTools::addWeight( newFunc );
|
||||
coll[0]->updateConnectedEditors();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( newFunc );
|
||||
RiuPlotMainWindowTools::setExpanded( coll.front() );
|
||||
|
||||
Reference in New Issue
Block a user