fix tracking of unsaved edits for automapcfg
don't flag changes read from config files
This commit is contained in:
@@ -133,7 +133,6 @@ void mapmodelreset()
|
||||
{
|
||||
mapmodels.shrink(0);
|
||||
mapmodelchanged = 1;
|
||||
flagmapconfigchange();
|
||||
}
|
||||
}
|
||||
COMMAND(mapmodelreset, "");
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user