﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6248	Syntactically wrong modifications are lost when saving other models on the same file	Francesco Casella	Adeel Asghar	"Steps to reproduce:
- load package {{{P}}}
- open model {{{M1}}}
- open model {{{M2}}}
- add {{{Real x = 1}}} without semicolon to model {{{M2}}}
- switch to {{{M1}}}
- change {{{x = 5}}} into {{{x = 6}}}
- save {{{M1}}}
- switch to {{{M2}}}
- the incomplete equation {{{Real x = 1}}} is gone

Obviously this happens because OMC needs to save {{{P.mo}}} and cannot do so with syntactically invalid code in {{{M2}}}. However, if just spent 30 minutes working on {{{M2}}}, such a behaviour can be surprising, and possibly a bit annoying.

It is OK (and in fact quite desirable) that one can switch to other tabs from a syntactically incomplete tab, e.g. to look for component or type names. What is not ok is that syntactically incorrect or incomplete code is silently discarded when saving the file it would belong to.

Proposal: when saving a file that involves a tab with code that cannot be parsed. open a dialog with the following error message ""Tab XXX contains invalid Modelica code. This prevents saving yyy.mo"" and three buttons:
  1. Fix errors manually (-> brings Tab XXX to the foreground)
  2. Discard changes in Tab XXX and save (-> current behaviour)
  3. Cancel

If there are multiple tabs with problems, show this dialog for the first one, and then when trying to save again show the next one and so forth."	defect	closed	blocker	1.17.0	OMEdit	1.16.0	fixed		Andrea Bartolini massimo ceraolo simone1.bosotti@… matteoluigi.depascali@… paolo.curatolo@…
