[commit] r2110 - trunk/GME/GMEActiveBrowser
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Nov 15 12:44:27 CST 2012
Author: ksmyth
Date: Thu Nov 15 12:44:27 2012
New Revision: 2110
Log:
Fix bug where right click on an unselected item would deselect just one item
Modified:
trunk/GME/GMEActiveBrowser/TreeCtrlEx.cpp
trunk/GME/GMEActiveBrowser/TreeCtrlEx.h
Modified: trunk/GME/GMEActiveBrowser/TreeCtrlEx.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/TreeCtrlEx.cpp Thu Nov 15 12:44:02 2012 (r2109)
+++ trunk/GME/GMEActiveBrowser/TreeCtrlEx.cpp Thu Nov 15 12:44:27 2012 (r2110)
@@ -77,6 +77,7 @@
ON_NOTIFY_REFLECT_EX(NM_KILLFOCUS, OnKillfocus)
ON_NOTIFY_REFLECT_EX(TVN_SELCHANGED, OnSelchanged)
ON_WM_RBUTTONDOWN()
+ ON_WM_RBUTTONUP()
ON_WM_LBUTTONDBLCLK()
ON_WM_TIMER()
ON_WM_NCHITTEST()
@@ -289,6 +290,7 @@
// down-click point that we should cancel the pending select and initiate
// a drag/drop operation instead!
+ // FIXME: need to look at NC too, since if the user moves fast enough, we won't get this message
if ( m_hClickedItem )
{
CSize sizeMoved = m_ptClick-point;
@@ -615,10 +617,11 @@
{
if(!( GetItemState( hClickedItem, TVIS_SELECTED ) & TVIS_SELECTED ))
{
- ClearSelection();
+ ClearSelection(TRUE);
SelectItem( hClickedItem );
}
}
+ m_hClickedItem = hClickedItem;
}
// Modified: 01/26/2002 Tihamer Levendovszky
else
@@ -630,6 +633,12 @@
/* CTreeCtrl::OnRButtonDown( nFlags, point ); */
}
+void CTreeCtrlEx::OnRButtonUp(UINT nFlags, CPoint point)
+{
+ m_hClickedItem = NULL;
+ __super::OnRButtonUp(nFlags, point);
+}
+
///////////////////////////////////////////////////////////////////////////////
// Get number of selected items
Modified: trunk/GME/GMEActiveBrowser/TreeCtrlEx.h
==============================================================================
--- trunk/GME/GMEActiveBrowser/TreeCtrlEx.h Thu Nov 15 12:44:02 2012 (r2109)
+++ trunk/GME/GMEActiveBrowser/TreeCtrlEx.h Thu Nov 15 12:44:27 2012 (r2110)
@@ -99,6 +99,7 @@
afx_msg BOOL OnSetfocus(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg BOOL OnKillfocus(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
+ afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT_PTR nIDEvent);
More information about the gme-commit
mailing list