Qucs / qucs

Qucs Project official mirror
http://qucs.sourceforge.net/
GNU General Public License v2.0
1.15k stars 213 forks source link

Unexpected Duplicate Schematic Behaviour #633

Closed nouwaarom closed 7 years ago

nouwaarom commented 7 years ago

Steps to reproduce:

Expected: the data display file and dataset corresponding to the original schematic to be duplicated too

Actual: both the original and the duplicated schematic use the original data display file and dataset

in3otd commented 7 years ago

personally, I'm used to that behavior but I see it can be confusing at first, also because it's not consistent with what "Save as" does. It may make sense to do what "Save as" does also when duplicating the schematic, i.e. using the new (base)name also for the default Dataset and Data Display of the duplicated schematic.

I'm not in favor of having "Duplicate" create other files also because it should apply only on the selected file, IMHO; also the Data Displays and Datasets can be duplicated manually if one wants/needs to.

cvgaviao commented 7 years ago

It would at least to change the names of files in "document settings" to the new name that was chose.

in3otd commented 7 years ago

I thought (a little) about that and I think the current solution is the best compromise: using "Save As..." changes the names of files in "Document Settings", while the operations available in the drop-down menu from the mouse right button in the project content view operate at the file-level only, so without changing anything else. We should of course document the behavior...

ra3xdh commented 7 years ago

See also https://github.com/ra3xdh/qucs/issues/26 for the same issue report. Maybe it's better to emulate a SaveAs operation in QucsApp::slotCMenuCopy() instead of simple copying of file? Current behavior when file is just copied may mislead user.

in3otd commented 7 years ago

to expand a little bit on my previous comment, we currently have two functionalities

I'm reluctant to change any of these because I actually use both: I may have several different version/refinements of a schematic, which I create incrementally using the Duplicate menu, so I still have one Data Display will all the graphs and markers/etc. I need and I use Save as... to create a separate schematic from some existing one I have around.

I will tend to leave things as they are, since I see the Content tab context menu as operating on single files only - we have Duplicate, Rename and Delete. To make things less confusing for new users we may change Duplicate to Copy file or put a header File operations to the context menu (if possible). And, of course, we could actually have some documentation for this :grin:

ra3xdh commented 7 years ago

we may change Duplicate to Copy file

Yes, it will be the best solution

And, of course, we could actually have some documentation for this

We can add a note on "Duplication" here: https://qucs-help.readthedocs.io/en/latest/short.html#mouse-in-content-tab

I can prepare a fix for this in this week.

in3otd commented 7 years ago

fixed in #695 and Qucs/qucs-help#15