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();
 | 
			
		||||
@ -91,7 +93,9 @@ void TConfig_application::do_config(int m)
 | 
			
		||||
      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))
 | 
			
		||||
              
 | 
			
		||||
              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; 
 | 
			
		||||
      if (k == K_QUIT) 
 | 
			
		||||
        break comunque;
 | 
			
		||||
    }
 | 
			
		||||
    else 
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user