Patch level : 10.0 70
Files correlati : ba3.exe Ricompilazione Demo : [ ] Commento : Corretta la gestione del focus dopo registra sulle relapp git-svn-id: svn://10.65.10.50/trunk@16793 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
bed3ea36ef
commit
a3e4a6db73
@ -315,9 +315,10 @@ int TMask::find_first_active(WINDOW p) const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TMask::first_focus(short id)
|
int TMask::first_focus(short id, bool dirty)
|
||||||
{
|
{
|
||||||
static int tempfirstfocus = -1;
|
static int tempfirstfocus = -1;
|
||||||
|
static bool tempdirty = false;
|
||||||
|
|
||||||
int f = _first_focus;
|
int f = _first_focus;
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
@ -325,7 +326,7 @@ int TMask::first_focus(short id)
|
|||||||
if (tempfirstfocus >= 0)
|
if (tempfirstfocus >= 0)
|
||||||
{
|
{
|
||||||
f = tempfirstfocus;
|
f = tempfirstfocus;
|
||||||
if (fld(f).dirty() == false)
|
if (tempdirty && fld(f).dirty() == false)
|
||||||
fld(f).set_dirty();
|
fld(f).set_dirty();
|
||||||
tempfirstfocus = -1;
|
tempfirstfocus = -1;
|
||||||
}
|
}
|
||||||
@ -347,7 +348,10 @@ int TMask::first_focus(short id)
|
|||||||
tempfirstfocus = -1;
|
tempfirstfocus = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
f = tempfirstfocus = id2pos(-id);
|
f = tempfirstfocus = id2pos(-id);
|
||||||
|
tempdirty = dirty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKD(f >= 0 && f < fields(), "Invalid focus field ", f);
|
CHECKD(f >= 0 && f < fields(), "Invalid focus field ", f);
|
||||||
|
@ -309,7 +309,7 @@ public:
|
|||||||
// @cmember Ritorna il contenuto del primo campo attivo campo che ha come FIELD <p fld_id>
|
// @cmember Ritorna il contenuto del primo campo attivo campo che ha come FIELD <p fld_id>
|
||||||
const TString& get(const char * fld_id) const;
|
const TString& get(const char * fld_id) const;
|
||||||
// @cmember Indica quale campo deve ricevere per primo il focus nella maschera
|
// @cmember Indica quale campo deve ricevere per primo il focus nella maschera
|
||||||
int first_focus(short id);
|
int first_focus(short id, bool dirty = true);
|
||||||
|
|
||||||
// @cmember Ritorna il numero del controllo che possiede il focus
|
// @cmember Ritorna il numero del controllo che possiede il focus
|
||||||
TOperable_field& focus_field() const;
|
TOperable_field& focus_field() const;
|
||||||
|
@ -1377,7 +1377,7 @@ void TRelation_application::main_loop()
|
|||||||
{
|
{
|
||||||
const TMask_field & f = _mask->focus_field();
|
const TMask_field & f = _mask->focus_field();
|
||||||
|
|
||||||
_mask->first_focus(-f.dlg());
|
_mask->first_focus(-f.dlg(), false);
|
||||||
modify_mode();
|
modify_mode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user