mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
A file that we import should never become the default file we save to
Only files that are opened should be considered r/w. Files that are imported should be treated as if they were r/o. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ffd3b8591d
commit
a2afe41280
5 changed files with 18 additions and 14 deletions
|
@ -1455,7 +1455,8 @@ static void reset_all(void)
|
|||
import_source = UNKNOWN;
|
||||
}
|
||||
|
||||
void parse_xml_buffer(const char *url, const char *buffer, int size, GError **error)
|
||||
void parse_xml_buffer(const char *url, const char *buffer, int size, GError **error,
|
||||
gboolean possible_default_filename)
|
||||
{
|
||||
xmlDoc *doc;
|
||||
|
||||
|
@ -1472,7 +1473,8 @@ void parse_xml_buffer(const char *url, const char *buffer, int size, GError **er
|
|||
return;
|
||||
}
|
||||
/* remember, if necessary, that this is the filename to store to */
|
||||
set_filename(url, FALSE);
|
||||
if (possible_default_filename)
|
||||
set_filename(url, FALSE);
|
||||
reset_all();
|
||||
dive_start();
|
||||
#ifdef XSLT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue