Conversation
There was a problem hiding this comment.
Pull request overview
Adds autosave + recovery loading support for “click-entry” point layers and adjusts UI behavior for single-frame (snapshot) datasets.
Changes:
- Track “dirty” point-layer tables and autosave them into the
recovery/folder on the main autosave cadence and on position switches. - Prompt to load a newer recovery CSV for point layers when it’s newer than the main CSV.
- Guard points-layer DataFrame conversion when a position has no points data; hide/disable
delNewObjActionin snapshot mode.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
cellacdc/gui.py |
Implements dirty tracking + autosave flush for point layers, recovery/newer-file prompt flow, and snapshot-mode UI changes. |
cellacdc/widgets.py |
Prevents crash when converting point-layer actions to DataFrame if current position is missing in action.pointsData. |
Comments suppressed due to low confidence (1)
cellacdc/gui.py:19740
- In snapshot mode
delNewObjActionis hidden/disabled, but in theelsebranch it is never restored. Switching from snapshot back to other modes will leave the action permanently hidden/disabled until restart. Please re-enable and show it in the non-snapshot branch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/SchmollerLab/Cell_ACDC/sessions/e130e0da-6862-4494-b26c-da092b0027a6 Co-authored-by: Teranis <33847528+Teranis@users.noreply.github.com>
|
It could be a good idea to add the whole saving routine to the autosaver worker, but saving is so fast that I didn't bother 🙃 |
…ecks Agent-Logs-Url: https://github.com/SchmollerLab/Cell_ACDC/sessions/e192cb9c-4295-487b-8649-28afeaea8c57 Co-authored-by: Teranis <33847528+Teranis@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.delNewObjAction.setVisible(False) | ||
| self.delNewObjAction.setDisabled(True) |
There was a problem hiding this comment.
setFramesSnapshotMode disables/hides delNewObjAction when entering Snapshot mode, but the else branch (leaving Snapshot mode) does not re-enable/show it. This will leave the action permanently disabled/hidden after toggling back to Viewer. Please restore symmetric setVisible(True)/setDisabled(False) in the non-snapshot branch.
| filepath, _ = self.getClickEntryTableFilepaths(posData, tableEndName) | ||
| if os.path.exists(filepath): | ||
| doesTableExists = True | ||
| break |
There was a problem hiding this comment.
checkClickEntryTableEndnameExists now only considers the main table path (filepath) when deciding whether a table exists. With the new recovery autosave flow, it's possible for only the recovery file to exist (e.g., user never manually saved, or main file was deleted), in which case this function returns early and prevents loading/recovering points. Consider treating an existing recovery table as “table exists” too (e.g., check recovery_filepath from getClickEntryTableFilepaths), and then let loadClickEntryDfs decide which file to load.
posData.recoveryFolderpath()insavePointsAddedByClickingFromEndnameto ensure recovery folder exists before writingloadClickEntryDfsto check file existence beforepd.read_csvand only use recovery file when it exists and is actually newer than the main file