saving some updates
This commit is contained in:
parent
bb3a5d9b7b
commit
9b75c366de
4 changed files with 70 additions and 39 deletions
|
@ -1356,6 +1356,29 @@ impl service_item_model::ServiceItemModel {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_indices(
|
||||
self: Pin<&mut Self>,
|
||||
item_id: i32,
|
||||
role: ServiceRoles,
|
||||
) -> (usize, QModelIndex, QVector_i32) {
|
||||
let mut vector_roles = QVector_i32::default();
|
||||
vector_roles.append(self.as_ref().get_role(role));
|
||||
if let Some(index) =
|
||||
self.as_ref().service_items.iter().position(|x| x.id == item_id)
|
||||
{
|
||||
let model_index = self.as_ref().index(
|
||||
index as i32,
|
||||
0,
|
||||
&QModelIndex::default(),
|
||||
);
|
||||
(index, model_index, vector_roles)
|
||||
} else {
|
||||
error!(item_id, "This item appears to be missing");
|
||||
(0, QModelIndex::default(), vector_roles)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn load_last_saved(self: Pin<&mut Self>) -> bool {
|
||||
todo!();
|
||||
// Don't actually need
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue