Adding feature to remove annotations
This commit is contained in:
@@ -706,6 +706,25 @@ class DatabaseManager:
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
def delete_annotation(self, annotation_id: int) -> bool:
|
||||
"""
|
||||
Delete a manual annotation by ID.
|
||||
|
||||
Args:
|
||||
annotation_id: ID of the annotation to delete
|
||||
|
||||
Returns:
|
||||
True if an annotation was deleted, False otherwise.
|
||||
"""
|
||||
conn = self.get_connection()
|
||||
try:
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("DELETE FROM annotations WHERE id = ?", (annotation_id,))
|
||||
conn.commit()
|
||||
return cursor.rowcount > 0
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
# ==================== Object Class Operations ====================
|
||||
|
||||
def get_object_classes(self) -> List[Dict]:
|
||||
|
||||
Reference in New Issue
Block a user