SynapseWeb / PyReconstruct

GNU General Public License v3.0
8 stars 3 forks source link

Copy/duplicate function has mysteriously disappeared #37

Open fs2dw opened 5 hours ago

fs2dw commented 5 hours ago

Describe the bug

I used to be able to duplicate a full object (not just individual traces) in Reconstruct and PyReconstruct but now I no longer can - when I click Copy it does not create a copy, nor do I see a "duplicate object function". I swear I've been able to do this previously and I am unsure as to why that functionality is now lost.

Commit or version

PyReconstruct version 1.10.0

To Reproduce

Steps to reproduce the behavior:

N/A since behavior cannot be produced in the first place.

Expected behavior

I would expect for there to be a "Copy of" object in my object list.

Desktop environment:

Windows 11

Python version

miniconda3

Error messages

N/A

Screenshots

--

Additional context

--

lattaai13 commented 5 hours ago

Hello, I tried to solve the issue.

This is what I did:

This change adds a new function 'duplicateObject' to the FieldWidgetObject class. This function allows users to duplicate an entire object, including all its traces across sections. It also updates the object list and reloads the field to reflect the changes.

You can review changes in this commit: https://github.com/lattaai13/SynapseWeb-PyReconstruct-37/commit/2e1e54a2bc4d25f198acce4c331fa36d89899aa8.

[!CAUTION] Disclaimer: The commit was created by Latta AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


This issue was tried to solve for free by Latta AI - https://latta.ai/ourmission

If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

quasiTriestino commented 4 hours ago

Thanks for the note! This is on my todo list this week (so the request is prescient). I will make changes and once I push the commit I will let you know. Thanks!