[commit] r2108 - trunk/GME/ObjectInspector
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Nov 15 12:43:40 CST 2012
Author: ksmyth
Date: Thu Nov 15 12:43:40 2012
New Revision: 2108
Log:
Make tab work in multi-line edits. Make shift-tab work
Modified:
trunk/GME/ObjectInspector/InPlaceEdit.cpp
trunk/GME/ObjectInspector/InspectorList.cpp
trunk/GME/ObjectInspector/InspectorList.h
Modified: trunk/GME/ObjectInspector/InPlaceEdit.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InPlaceEdit.cpp Thu Nov 15 12:43:14 2012 (r2107)
+++ trunk/GME/ObjectInspector/InPlaceEdit.cpp Thu Nov 15 12:43:40 2012 (r2108)
@@ -100,12 +100,13 @@
GetParent()->SetFocus();
return 0;
}break;
- case VK_TAB: // for JIRA GME-178
case VK_RETURN:
{
if(!(GetStyle()&ES_MULTILINE))
+ case VK_TAB: // for JIRA GME-178
{
GetParent()->SetFocus();
+ GetParent()->SendMessage(WM_KEYDOWN, VK_TAB, lParam);
}
}break;
case'D':
Modified: trunk/GME/ObjectInspector/InspectorList.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InspectorList.cpp Thu Nov 15 12:43:14 2012 (r2107)
+++ trunk/GME/ObjectInspector/InspectorList.cpp Thu Nov 15 12:43:40 2012 (r2108)
@@ -884,18 +884,13 @@
}
-bool CInspectorList::SelectNextItem(void)
+bool CInspectorList::SelectNextItem(BOOL reverse)
{
int nCount = GetCount();
if (nCount > 1) {
int nCurSel = GetCurSel(); // In a multiple-selection list box, the index of the item that has the focus.
- if (nCurSel < nCount - 1) {
- nCurSel++;
- } else if (nCurSel == nCount - 1) {
- nCurSel = 0;
- } else {
- return false;
- }
+ nCurSel = nCurSel + (reverse ? -1 : 1);
+ nCurSel = (nCurSel + nCount) % nCount;
// Clear current selections
// Get the indexes of all the selected items.
int nSelCount = GetSelCount();
@@ -908,6 +903,12 @@
// Select the next focused
SetSel(nCurSel, TRUE);
OnSelChange();
+
+ // TODO: pop up comboboxes (tricky because they're not really comboboxes)
+ //CListItem& ListItem=m_ListItemArray.ElementAt(nCurSel);
+ //if (ListItem.Value.dataType == ITEMDATA_BOOLEAN || ListItem.Value.dataType == ITEMDATA_FIXED_LIST) {
+ // m_InPlaceManager.OnClickArrowButton(false);
+ //}
return true;
}
return false;
@@ -961,7 +962,7 @@
break;
case VK_TAB: // JIRA GME-178
{
- SelectNextItem();
+ SelectNextItem(::GetKeyState(VK_SHIFT) & 0x8000);
}
break;
}
Modified: trunk/GME/ObjectInspector/InspectorList.h
==============================================================================
--- trunk/GME/ObjectInspector/InspectorList.h Thu Nov 15 12:43:14 2012 (r2107)
+++ trunk/GME/ObjectInspector/InspectorList.h Thu Nov 15 12:43:40 2012 (r2108)
@@ -104,7 +104,7 @@
void UpdateItem(const CListItem& srcListItem, CListItem& dstListItem, int nIndex);
void SetDefault();
void SetHelp(int nIndex);
- bool SelectNextItem(void); // JIRA GME-178
+ bool SelectNextItem(BOOL reverse); // JIRA GME-178
CInPlaceManager m_InPlaceManager;
More information about the gme-commit
mailing list