Patch level : 12.0 no-patch
Files correlati : Commento : - Sistemata apertura in visualizzazione utenti, adesso vengono ripuliti i filtri e se il file è bloccato si visualizza lo stesso. - Abilitato bottone "Nuovo" anche in visualizzazione git-svn-id: svn://10.65.10.50/branches/R_10_00@23870 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									271137eaa1
								
							
						
					
					
						commit
						c784edac65
					
				@ -335,7 +335,9 @@ void TRelation_application::set_toolbar()
 | 
				
			|||||||
  pos = _mask->id2pos(DLG_NEWREC);
 | 
					  pos = _mask->id2pos(DLG_NEWREC);
 | 
				
			||||||
  if (pos >= 0) 
 | 
					  if (pos >= 0) 
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    bool enabins = (mode == MODE_QUERY || _lnflag == 0) && can_edit_some;
 | 
						// Prima: can_edit_some = can_I_write(NULL)
 | 
				
			||||||
 | 
						// Adesso: user_can_write() -> a me interessa che l'utente possa scrivere senza controllare che sia bloccato il record, si può sempre creare un record (se abilitati) nuovo anche in visualizzazione
 | 
				
			||||||
 | 
					    bool enabins = (mode == MODE_QUERY || _lnflag == 0) && user_can_write(NULL);
 | 
				
			||||||
    _mask->fld(pos).enable(enabins);
 | 
					    _mask->fld(pos).enable(enabins);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -589,10 +591,10 @@ bool TRelation_application::modify_mode()
 | 
				
			|||||||
  set_mode(MODE_MOD);
 | 
					  set_mode(MODE_MOD);
 | 
				
			||||||
                             
 | 
					                             
 | 
				
			||||||
  err = read(*_mask);
 | 
					  err = read(*_mask);
 | 
				
			||||||
  if (err != NOERR)
 | 
					  if (err != NOERR && (!_locked || err != _islocked))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    query_mode();
 | 
					    query_mode();
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  rel->save_status();
 | 
					  rel->save_status();
 | 
				
			||||||
@ -602,7 +604,7 @@ bool TRelation_application::modify_mode()
 | 
				
			|||||||
  // Forse deve essere fatta prima della init_modify_mode()!
 | 
					  // Forse deve essere fatta prima della init_modify_mode()!
 | 
				
			||||||
  if (_curr_transaction == TRANSACTION_MODIFY)
 | 
					  if (_curr_transaction == TRANSACTION_MODIFY)
 | 
				
			||||||
    ini2insert_mask(); 
 | 
					    ini2insert_mask(); 
 | 
				
			||||||
  return TRUE;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1016,6 +1018,7 @@ void TRelation_application::edit_cancel()
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    TRelation* rel = get_relation();
 | 
					    TRelation* rel = get_relation();
 | 
				
			||||||
    rel->restore_status();
 | 
					    rel->restore_status();
 | 
				
			||||||
 | 
					    _locked = false;
 | 
				
			||||||
	rel->lfile().reread(_unlock);           // Unlock main file
 | 
						rel->lfile().reread(_unlock);           // Unlock main file
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user