Quintiq file version 2.0
#parent: #root
Method SnapToCurrentRange (
  dpNavigationToolbar dpnavigationpanel
) id:Method_ApplicationLibMacroPlanner_SnapToCurrentRange
{
  #keys: '[131438.0.415046109]'
  Body:
  [*
    //Snap to current range
    activeperiods := selectsortedset( DataHolderActivePeriods.Data(), Elements, period,
                                      true, period.End() );
    
    if( not isnull( activeperiods ) )
    {
      dpnavigationpanel.Data().Show( activeperiods.Element( 0 ).Start(),
                                     activeperiods.SelectLast( 1 ).Element( 0 ).End() );
    }
  *]
}
