Non chiedeva conferma se si usciva senza salvare e non usciva facendo
FINE git-svn-id: svn://10.65.10.50/trunk@1051 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6043fdc5fb
commit
a0232631e3
@ -4,6 +4,8 @@
|
||||
#include <mask.h>
|
||||
#include <relation.h>
|
||||
|
||||
#define comunque
|
||||
|
||||
bool TConfig_application::create()
|
||||
{
|
||||
TApplication::create();
|
||||
@ -90,8 +92,10 @@ void TConfig_application::do_config(int m)
|
||||
int k = m.run();
|
||||
if (!postprocess_config(m,cnf))
|
||||
break;
|
||||
|
||||
if (k == K_ENTER)
|
||||
|
||||
bool tosave = k == K_ENTER || k == K_SAVE;
|
||||
|
||||
if (k == K_ENTER || k == K_QUIT)
|
||||
{
|
||||
// aggiusta campi
|
||||
for (i = 0; i < m.fields(); i++)
|
||||
@ -105,14 +109,21 @@ void TConfig_application::do_config(int m)
|
||||
const char* fname = fref->name();
|
||||
const char* value = f.get();
|
||||
const char* oldvl = cnf.get(fname);
|
||||
if (postprocess_config_changed(par,fname,
|
||||
oldvl,value))
|
||||
cnf.set(fname, value, NULL, TRUE);
|
||||
|
||||
if (!tosave)
|
||||
tosave = yesno_box("Modifiche non registrate. Salvare?");
|
||||
|
||||
if (!tosave) break;
|
||||
|
||||
if (postprocess_config_changed(par,fname, oldvl,value))
|
||||
cnf.set(fname, value, NULL, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else break;
|
||||
else break;
|
||||
if (k == K_QUIT)
|
||||
break comunque;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ class TConfig_application : public TApplication
|
||||
{
|
||||
|
||||
TArray _paragraphs;
|
||||
int _which_config;
|
||||
int _which_config;
|
||||
MENU_TAG _last_choice;
|
||||
|
||||
virtual bool create();
|
||||
|
Loading…
x
Reference in New Issue
Block a user