mirror of
https://github.com/rbreu/beeref.git
synced 2026-03-11 08:54:28 +00:00
Fix: image binary data being retained in bee file after deleting
This commit is contained in:
parent
78963119e0
commit
3311294ccd
3 changed files with 11 additions and 0 deletions
|
|
@ -9,6 +9,12 @@ Added
|
|||
JPG. In the newly created settings dialog, this behaviour can be
|
||||
changed to always use PNG (the former behaviour) always JPG.
|
||||
|
||||
Fixed
|
||||
-----
|
||||
|
||||
* Fixed a bug where the binary data of deleted images would still hang
|
||||
around in the bee file.
|
||||
|
||||
|
||||
0.3.0 - 2023-11-23
|
||||
==================
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ class SQLiteIO:
|
|||
|
||||
def delete_items(self, to_delete):
|
||||
self.exmany('DELETE FROM items WHERE id=?', to_delete)
|
||||
self.exmany('DELETE FROM sqlar WHERE item_id=?', to_delete)
|
||||
self.connection.commit()
|
||||
|
||||
def insert_item(self, item):
|
||||
|
|
|
|||
|
|
@ -388,8 +388,12 @@ def test_sqliteio_write_removes_nonexisting_pixmap_item(tmpfile, view):
|
|||
view.scene.addItem(item)
|
||||
io = SQLiteIO(tmpfile, view.scene, create_new=True)
|
||||
io.write()
|
||||
assert io.fetchone('SELECT COUNT(*) from items') == (1,)
|
||||
assert io.fetchone('SELECT COUNT(*) from sqlar') == (1,)
|
||||
|
||||
view.scene.removeItem(item)
|
||||
|
||||
io = SQLiteIO(tmpfile, view.scene, create_new=False)
|
||||
io.create_new = False
|
||||
io.write()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue