mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
More fixes to searching field focus issues
git-svn-id: svn://ultimatepp.org/upp/trunk@1693 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
719985586a
commit
2da7a48780
3 changed files with 18 additions and 18 deletions
|
|
@ -2342,7 +2342,7 @@ void GridCtrl::Layout()
|
|||
UpdateSizes();
|
||||
UpdateSb();
|
||||
UpdateHolder();
|
||||
UpdateCtrls(UC_CHECK_VIS | UC_SHOW);
|
||||
UpdateCtrls(UC_CHECK_VIS | UC_SHOW | UC_FOCUS);
|
||||
SyncCtrls();
|
||||
}
|
||||
|
||||
|
|
@ -2521,7 +2521,7 @@ void GridCtrl::Scroll()
|
|||
LG("Scroll (%d, %d)", delta.cx, delta.cy);
|
||||
|
||||
SyncCtrls();
|
||||
UpdateCtrls(UC_CHECK_VIS | UC_SHOW | UC_SCROLL);
|
||||
UpdateCtrls(UC_CHECK_VIS | UC_SHOW | UC_SCROLL | UC_FOCUS);
|
||||
|
||||
if(resizeCol || resizeRow)
|
||||
return;
|
||||
|
|
@ -3281,7 +3281,7 @@ GridCtrl::CurState GridCtrl::SetCursor0(Point p, int opt, int dirx, int diry)
|
|||
cs.accepted = true;
|
||||
if(hidectrls && (edit_mode == GE_CELL || (edit_mode == GE_ROW && (isnewrow || !newvalid))))
|
||||
{
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS | UC_OLDCUR);
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS | UC_OLDCUR | UC_FOCUS);
|
||||
if(!one_click_edit || !newvalid)
|
||||
WhenEndEdit();
|
||||
}
|
||||
|
|
@ -4505,7 +4505,7 @@ void GridCtrl::UpdateCtrls(int opt /*= UC_CHECK_VIS | UC_SHOW | UC_CURSOR | UC_F
|
|||
|
||||
edit_ctrls = isctrl;
|
||||
|
||||
if(!show && ctrls)
|
||||
if(opt & UC_FOCUS && !show && ctrls)
|
||||
SetFocus();
|
||||
|
||||
if(opt & UC_CTRLS)
|
||||
|
|
@ -4514,9 +4514,6 @@ void GridCtrl::UpdateCtrls(int opt /*= UC_CHECK_VIS | UC_SHOW | UC_CURSOR | UC_F
|
|||
if(opt & UC_CTRLS_OFF && !isctrl)
|
||||
ctrls = false;
|
||||
|
||||
//if(opt & UC_FOCUS)
|
||||
// SetFocus();
|
||||
|
||||
if(!(opt & UC_SCROLL))
|
||||
RebuildToolBar();
|
||||
|
||||
|
|
@ -5507,7 +5504,7 @@ void GridCtrl::Clear(bool columns)
|
|||
{
|
||||
doscroll = false;
|
||||
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS);
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS | UC_FOCUS);
|
||||
|
||||
items.Remove(1, items.GetCount() - 1);
|
||||
vitems.Remove(1, vitems.GetCount() - 1);
|
||||
|
|
@ -6201,9 +6198,10 @@ void GridCtrl::Repaint(bool do_recalc_cols /* = false*/, bool do_recalc_rows /*
|
|||
UpdateSb();
|
||||
UpdateHolder();
|
||||
UpdateSummary();
|
||||
UpdateCtrls();
|
||||
if(opt & RP_UPDCTRLS)
|
||||
UpdateCtrls();
|
||||
SyncCtrls();
|
||||
if(!(opt & RP_NOTOOLBAR))
|
||||
if(opt & RP_TOOLBAR)
|
||||
RebuildToolBar();
|
||||
doscroll = true;
|
||||
Refresh();
|
||||
|
|
@ -6285,7 +6283,7 @@ bool GridCtrl::EndEdit(bool accept, bool doall, bool remove_row)
|
|||
if(accept && !GetCtrlsData(false, doall, accept))
|
||||
return false;
|
||||
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS);
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS | UC_FOCUS);
|
||||
|
||||
if(!accept)
|
||||
{
|
||||
|
|
@ -6446,7 +6444,7 @@ bool GridCtrl::Remove0(int row, int cnt /* = 1*/, bool recalc /* = true*/, bool
|
|||
total_height -= vitems[rowidx].nHeight();
|
||||
|
||||
if(rid == ctrlid.y)
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS);
|
||||
UpdateCtrls(UC_HIDE | UC_CTRLS | UC_FOCUS);
|
||||
|
||||
bool removed = false;
|
||||
|
||||
|
|
@ -7205,7 +7203,7 @@ void GridCtrl::ShowRows(bool repaint)
|
|||
vitems[i].size = vitems[i].tsize;
|
||||
}
|
||||
if(change || repaint)
|
||||
Repaint(false, true, RP_NOTOOLBAR);
|
||||
Repaint(false, true, UC_SCROLL);
|
||||
}
|
||||
|
||||
void GridCtrl::MenuHideColumn(int n)
|
||||
|
|
@ -7227,7 +7225,6 @@ int GridCtrl::ShowMatchedRows(const WString &f)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if(!search_immediate && search_highlight)
|
||||
{
|
||||
ClearFound(true, false);
|
||||
|
|
@ -7321,7 +7318,7 @@ int GridCtrl::ShowMatchedRows(const WString &f)
|
|||
if(change || search_highlight)
|
||||
{
|
||||
LG("Repaint %d", search_hide);
|
||||
Repaint(false, search_hide, RP_NOTOOLBAR);
|
||||
Repaint(false, search_hide, 0);
|
||||
}
|
||||
}
|
||||
else if(search_hide)
|
||||
|
|
@ -7397,7 +7394,7 @@ bool GridCtrl::Match(const WString &f, const WString &s, int &fs, int &fe)
|
|||
|
||||
void GridCtrl::DoFind()
|
||||
{
|
||||
UpdateCtrls(UC_CHECK_VIS | UC_HIDE);
|
||||
UpdateCtrls(UC_CHECK_VIS | UC_HIDE | UC_CTRLS | UC_SCROLL);
|
||||
ShowMatchedRows((WString) ~find);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,9 @@ class GridCtrl : public Ctrl
|
|||
|
||||
enum GridRepaintOpts
|
||||
{
|
||||
RP_NOTOOLBAR = BIT(0)
|
||||
RP_TOOLBAR = BIT(0),
|
||||
RP_UPDCTRLS = BIT(1),
|
||||
RP_ALL = BIT_ALL
|
||||
};
|
||||
|
||||
enum GridCursorState
|
||||
|
|
@ -1287,7 +1289,7 @@ class GridCtrl : public Ctrl
|
|||
void RefreshLeft();
|
||||
void RefreshSummary();
|
||||
|
||||
void Repaint(bool recalc_cols = false, bool recalc_rows = false, int opt = 0);
|
||||
void Repaint(bool recalc_cols = false, bool recalc_rows = false, int opt = RP_ALL);
|
||||
void Ready(bool b);
|
||||
|
||||
int GetMouseRow(Point &p, bool relative = true, bool fixed = false, bool full = true);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <Draw/iml_header.h>
|
||||
|
||||
#define BIT(x) (1 << x)
|
||||
#define BIT_ALL (0xFFFFFFFF)
|
||||
|
||||
class GridCtrl;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue