pub unsafe fn delete_filtered_out_rows(&self, app_ui: &Rc<AppUI>, pack_file_contents_ui: &Rc<PackFileContentsUI>) {

        let visible_columns = (0..self.table_model.column_count_0a()).filter(|index| !self.table_view_primary.is_column_hidden(*index)).collect::<Vec<i32>>();

        // If it's empty, it means everything is hidden, so we delete everything.
        let mut rows_to_delete = vec![];
        for row in 0..self.table_model.row_count_0a() {
            if visible_columns.is_empty() {
                rows_to_delete.push(row);
            } else if !self.table_filter.map_from_source(&self.table_model.index_2a(row, visible_columns[0])).is_valid() {
                rows_to_delete.push(row);
            }
        }

        // Dedup the list and reverse it.
        rows_to_delete.sort_unstable();
        rows_to_delete.dedup();
        rows_to_delete.reverse();

        self.set_data_on_cells(&[], 0, &rows_to_delete, app_ui, pack_file_contents_ui);
    }
/// This function takes care of the "Delete filtered-out rows" feature for tables.
This function takes care of the "Delete filtered-out rows" feature for tables.
This function takes care of the " Delete filtered - out rows " feature for tables .
pub unsafe fn delete_filtered_out_rows(&self, app_ui: &Rc<AppUI>, pack_file_contents_ui: &Rc<PackFileContentsUI>) {
        let visible_columns = (0..self.table_model.column_count_0a()).filter(|index| !self.table_view_primary.is_column_hidden(*index)).collect::<Vec<i32>>();
        // If it's empty, it means everything is hidden, so we delete everything.
        let mut rows_to_delete = vec![];
        for row in 0..self.table_model.row_count_0a() {
            if visible_columns.is_empty() {
                rows_to_delete.push(row);
            } else if !self.table_filter.map_from_source(&self.table_model.index_2a(row, visible_columns[0])).is_valid() {
                rows_to_delete.push(row);
            }
        }
        // Dedup the list and reverse it.
        rows_to_delete.sort_unstable();
        rows_to_delete.dedup();
        rows_to_delete.reverse();
        self.set_data_on_cells(&[], 0, &rows_to_delete, app_ui, pack_file_contents_ui);
    }
pub unsafe fn delete_filtered_out_rows ( & self , app_ui : & Rc < AppUI > , pack_file_contents_ui : & Rc < PackFileContentsUI > ) { let visible_columns = ( 0 .. self . table_model . column_count_0a ( ) ) . filter ( | index | ! self . table_view_primary . is_column_hidden ( * index ) ) . collect :: < Vec < i32 > > ( ) ; // If it's empty, it means everything is hidden, so we delete everything. let mut rows_to_delete = vec ! [ ] ; for row in 0 .. self . table_model . row_count_0a ( ) { if visible_columns . is_empty ( ) { rows_to_delete . push ( row ) ; } else if ! self . table_filter . map_from_source ( & self . table_model . index_2a ( row , visible_columns [ 0 ] ) ) . is_valid ( ) { rows_to_delete . push ( row ) ; } } // Dedup the list and reverse it. rows_to_delete . sort_unstable ( ) ; rows_to_delete . dedup ( ) ; rows_to_delete . reverse ( ) ; self . set_data_on_cells ( & [ ] , 0 , & rows_to_delete , app_ui , pack_file_contents_ui ) ; }
This function takes care of the "Delete filtered-out rows" feature for tables.
This function takes care of the " Delete filtered - out rows " feature for tables .
&self
app_ui
&Rc<AppUI>
pack_file_contents_ui
&Rc<PackFileContentsUI>
&self
app_ui
&Rc<AppUI>
pack_file_contents_ui
&Rc<PackFileContentsUI>