コード例 #1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RicRangeFilterInsertExec::redo()
{
    RimCellRangeFilter* rangeFilter = createRangeFilter();
    if (rangeFilter)
    {
        size_t index = m_cellRangeFilterCollection->rangeFilters.index(m_cellRangeFilter);
        CVF_ASSERT(index < m_cellRangeFilterCollection->rangeFilters.size());

        m_cellRangeFilterCollection->rangeFilters.insertAt(static_cast<int>(index), rangeFilter);

        rangeFilter->setDefaultValues();
        applyCommandDataOnFilter(rangeFilter);

        m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);

        m_cellRangeFilterCollection->updateConnectedEditors();

        RiuMainWindow::instance()->selectAsCurrentItem(rangeFilter);
    }
}
コード例 #2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RicRangeFilterNewExec::redo()
{
    RimCellRangeFilter* rangeFilter = createRangeFilter();
    if (rangeFilter)
    {
        m_cellRangeFilterCollection->rangeFilters.push_back(rangeFilter);

        rangeFilter->setDefaultValues();
        applyCommandDataOnFilter(rangeFilter);

        m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);

        m_cellRangeFilterCollection->updateConnectedEditors();

        Riu3DMainWindowTools::selectAsCurrentItem(rangeFilter);
        
        RimGridView* view = nullptr;
        m_cellRangeFilterCollection->firstAncestorOrThisOfTypeAsserted(view);

        //Enable display of grid cells, to be able to show generated range filter
        view->showGridCells(true);
    }
}