Skip to content

Commit

Permalink
Use addMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Dec 17, 2024
1 parent 6d3ed7b commit 0e3aca2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "RimViewController.h"
#include "RimViewLinker.h"

#include "cafCmdFeatureMenuBuilder.h"
#include "cafPdmUiEditorHandle.h"

CAF_PDM_SOURCE_INIT( RimEclipsePropertyFilterCollection, "CellPropertyFilters" );
Expand Down Expand Up @@ -234,3 +235,12 @@ RimEclipsePropertyFilter* RimEclipsePropertyFilterCollection::addFilterLinkedToC

return propertyFilter;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipsePropertyFilterCollection::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const
{
menuBuilder << "RicEclipsePropertyFilterNewFeature";
menuBuilder << "RicAddLinkedEclipsePropertyFilterFeature";
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class RimEclipsePropertyFilterCollection : public RimPropertyFilterCollection

protected:
void initAfterRead() override;
void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override;

private:
caf::PdmChildArrayField<RimEclipsePropertyFilter*> m_propertyFilters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#include "RimEclipseFaultColors.h"
#include "RimEclipseInputProperty.h"
#include "RimEclipsePropertyFilter.h"
#include "RimEclipsePropertyFilterCollection.h"
#include "RimEclipseResultAddress.h"
#include "RimEclipseStatisticsCase.h"
#include "RimEclipseView.h"
Expand Down Expand Up @@ -317,10 +316,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
{
menuBuilder << "RicSaveEclipseInputPropertyFeature";
}
else if ( dynamic_cast<RimEclipsePropertyFilterCollection*>( firstUiItem ) )
{
menuBuilder << "RicEclipsePropertyFilterNewFeature";
}
else if ( dynamic_cast<RimEclipsePropertyFilter*>( firstUiItem ) )
{
menuBuilder << "RicEclipsePropertyFilterInsertFeature";
Expand Down

0 comments on commit 0e3aca2

Please sign in to comment.