pub unsafe fn delete_faction(&self) -> Result<()> {
        let source_faction = self.faction_list_view.selection_model().selection();
        if source_faction.count_0a() != 1 {
            return Err(ErrorKind::GenericHTMLError("No faction selected".to_string()).into());
        }

        // Unselect the item, then delete it.
        self.faction_list_view.selection_model().select_q_item_selection_q_flags_selection_flag(&self.faction_list_view.selection_model().selection(), SelectionFlag::Toggle.into());
        let source_faction_real = self.get_ref_faction_list_filter().map_to_source(&source_faction.take_at(0).indexes().take_at(0));
        self.get_ref_faction_list_model().remove_row_1a(source_faction_real.row());

        Ok(())
    }
/// Function to delete a faction from the faction list.
Function to delete a faction from the faction list.
Function to delete a faction from the faction list .
pub unsafe fn delete_faction(&self) -> Result<()> {
        let source_faction = self.faction_list_view.selection_model().selection();
        if source_faction.count_0a() != 1 {
            return Err(ErrorKind::GenericHTMLError("No faction selected".to_string()).into());
        }
        // Unselect the item, then delete it.
        self.faction_list_view.selection_model().select_q_item_selection_q_flags_selection_flag(&self.faction_list_view.selection_model().selection(), SelectionFlag::Toggle.into());
        let source_faction_real = self.get_ref_faction_list_filter().map_to_source(&source_faction.take_at(0).indexes().take_at(0));
        self.get_ref_faction_list_model().remove_row_1a(source_faction_real.row());
        Ok(())
    }
pub unsafe fn delete_faction ( & self ) -> Result < ( ) > { let source_faction = self . faction_list_view . selection_model ( ) . selection ( ) ; if source_faction . count_0a ( ) != 1 { return Err ( ErrorKind :: GenericHTMLError ( " " . to_string ( ) ) . into ( ) ) ; } // Unselect the item, then delete it. self . faction_list_view . selection_model ( ) . select_q_item_selection_q_flags_selection_flag ( & self . faction_list_view . selection_model ( ) . selection ( ) , SelectionFlag :: Toggle . into ( ) ) ; let source_faction_real = self . get_ref_faction_list_filter ( ) . map_to_source ( & source_faction . take_at ( 0 ) . indexes ( ) . take_at ( 0 ) ) ; self . get_ref_faction_list_model ( ) . remove_row_1a ( source_faction_real . row ( ) ) ; Ok ( ( ) ) }
Function to delete a faction from the faction list.
Function to delete a faction from the faction list .
&self
&self