toonz/sources/toonz/cellselection.cpp
//-----------------------------------------------------------------------------
// check if the operation may remove expression reference as column becomes
// empty and deleted after the operation. return true to continue the operation.
check if the operation may remove expression reference as column becomes
empty and deleted after the operation. return true to continue the operation.
check if the operation may remove expression reference as column becomes empty and deleted after the operation . return true to continue the operation .
bool checkColumnRemoval(const int r0, const int c0, const int r1, const int c1,
                        std::set<int> &removedColIds) {
  TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
  for (int c = c0; c <= c1; c++) {
    TXshColumnP column = xsh->getColumn(c);
    if (!column || column->isEmpty() || column->isLocked()) continue;
    int tmp_r0, tmp_r1;
    xsh->getCellRange(c, tmp_r0, tmp_r1);
    if (r0 <= tmp_r0 && r1 >= tmp_r1) removedColIds.insert(c);
  }
  if (removedColIds.empty() ||
      !Preferences::instance()->isModifyExpressionOnMovingReferencesEnabled())
    return true;
  std::set<TFx *> dummy_fxs;
  return ColumnCmd::checkExpressionReferences(removedColIds, dummy_fxs, true);
}
bool checkColumnRemoval ( const int r0 , const int c0 , const int r1 , const int c1 , std :: set < int > & removedColIds ) { TXsheet * xsh = TApp :: instance ( ) -> getCurrentXsheet ( ) -> getXsheet ( ) ; for ( int c = c0 ; c <= c1 ; c ++ ) { TXshColumnP column = xsh -> getColumn ( c ) ; if ( ! column || column -> isEmpty ( ) || column -> isLocked ( ) ) continue ; int tmp_r0 , tmp_r1 ; xsh -> getCellRange ( c , tmp_r0 , tmp_r1 ) ; if ( r0 <= tmp_r0 && r1 >= tmp_r1 ) removedColIds . insert ( c ) ; } if ( removedColIds . empty ( ) || ! Preferences :: instance ( ) -> isModifyExpressionOnMovingReferencesEnabled ( ) ) return true ; std :: set < TFx * > dummy_fxs ; return ColumnCmd :: checkExpressionReferences ( removedColIds , dummy_fxs , true ) ; }
check if the operation may remove expression reference as column becomes
empty and deleted after the operation.
check if the operation may remove expression reference as column becomes empty and deleted after the operation .
// std::set<int> colIndicesToBeRemoved;