fix tracking of unsaved edits for automapcfg

don't flag changes read from config files
This commit is contained in:
ac-stef
2015-05-18 14:59:41 +02:00
parent c4e1155dcc
commit c6ac0f55f8
3 changed files with 3 additions and 12 deletions
-1
View File
@@ -133,7 +133,6 @@ void mapmodelreset()
{
mapmodels.shrink(0);
mapmodelchanged = 1;
flagmapconfigchange();
}
}
COMMAND(mapmodelreset, "");
+1 -8
View File
@@ -488,14 +488,7 @@ struct Slot
vector<Slot> slots;
COMMANDF(texturereset, "", ()
{
if(execcontext==IEXC_MAPCFG)
{
slots.setsize(0);
flagmapconfigchange();
}
});
COMMANDF(texturereset, "", () { if(execcontext==IEXC_MAPCFG) slots.setsize(0); });
void _texture(Slot &s, float *scale, char *name)
{
+2 -3
View File
@@ -405,8 +405,8 @@ void automapconfig()
COMMAND(automapconfig, "");
void flagmapconfigchange()
{
if(hdr.flags & MHF_AUTOMAPCONFIG) unsavededits++;
{ // if changes are tracked, because automapcfg is enabled and the change is not read from a config file -> set unsaved edits flag
if(execcontext != IEXC_MAPCFG && hdr.flags & MHF_AUTOMAPCONFIG) unsavededits++;
}
void getcurrentmapconfig(vector<char> &f, bool onlysounds)
@@ -785,7 +785,6 @@ bool load_world(char *mname) // still supports all map formats that have
if(hdr.flags & MHF_AUTOMAPCONFIG)
{ // full featured embedded config: no need to read any other map config files
copystring(lastloadedconfigfile, "");
unsavededits = 0;
}
else
{ // map config from files