layout and fix

This commit is contained in:
2024-04-08 16:34:14 +03:00
parent 5f768be350
commit 1be42eb584
8 changed files with 40 additions and 14 deletions

View File

@@ -84,7 +84,7 @@ impl ObjectImpl for MemoryCardsEditScene {
);
binding.imp().update_card_list();
}));
self.update_card_list();
// self.update_card_list();
}
}
@@ -139,8 +139,10 @@ impl MemoryCardsEditScene {
let connection = Connection::open(get_db_path()).unwrap();
let imagepath = card.imagepath();
let imagename = &Path::new(&imagepath).file_name().unwrap().to_str().unwrap();
dbg!("removing {}", imagename);
fs::remove_file(get_images_store_path() + "/" + &imagename).expect("Could not remove file!");
connection.execute("DELETE FROM cards WHERE imagename = ?1", [&imagename]).unwrap();
self_binding.imp().query_cards(None);
self_binding.imp().update_card_list();
}));
card.update_file_for_picture();