Qucs / qucs

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

Cannot paste schematic from previous version(s) #593

Closed in3otd closed 7 years ago

in3otd commented 7 years ago

In the GUI we can open schematics from previous versions but when trying to paste a schematic from a previous version a "Wrong document version" error pops up.

This comes from here where the pasted schematic version needs to be the same as the current Qucs version.

To easily reproduce:

(could maybe reuse the first commit of #340 to ease checking)

ra3xdh commented 7 years ago

Yes, I know about this problem. I always use clipboard editing to allow copy-pasting between versions. This issue should not concern simple users, because they usually uses only single Qucs version. But it makes development and debugging a bit more difficult.

felix-salfelder commented 7 years ago

perhaps, as long as loading old schematics is not fully tested, we should warn "loading old schematic, please be careful", instead? return false seems to be entirely pointless to me.

in3otd commented 7 years ago

yep, I was sure this was already known, but wanted to have a remainder to fix it :grin:

Currently we load old schematics without any user warning, I think we should have the same behavior (emit warning or not) when pasting. When 0.0.19 will be out, all existing users' (vs. developers) schematics will become old.

guitorri commented 7 years ago

There also something about loading future versions: https://github.com/Qucs/qucs/blob/release-0.0.19/qucs/qucs/dialogs/qucssettingsdialog.cpp#L134

in3otd commented 7 years ago

I was trying to understand the logic of the current code about loading from future versions: at present having it checked or unchecked makes practically no difference...

So, what I propose is to modify the current behavior as:

seems reasonable ?

(Edit: moved a sentence which ended up at the end to its proper place)

in3otd commented 7 years ago

Fixed in #607