[commit] r2078 - in trunk/GME: Gme MgaUtil
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Oct 3 16:25:03 CDT 2012
Author: ksmyth
Date: Wed Oct 3 16:25:03 2012
New Revision: 2078
Log:
Paste as Reference: MgaResolver: check that the user actually selected a role. Fixes d8ba20dd-78a9-4112-9f29-6fcde0d1846c
Modified:
trunk/GME/Gme/GMEView.cpp
trunk/GME/MgaUtil/DialogList.cpp
trunk/GME/MgaUtil/DialogList.h
trunk/GME/MgaUtil/MgaResolver.cpp
Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp Fri Sep 28 08:27:44 2012 (r2077)
+++ trunk/GME/Gme/GMEView.cpp Wed Oct 3 16:25:03 2012 (r2078)
@@ -3728,6 +3728,7 @@
COMTHROW(doc->resolver->put_IsStickyEnabled(::GetKeyState(VK_SHIFT) < 0 ? VARIANT_FALSE :VARIANT_TRUE));
HRESULT hr = doc->resolver->get_RefRoleByMeta(currentModel,aspect,fco,&role);
if (hr == E_ABORT) {
+ AbortTransaction(hr);
return false;
} else {
COMTHROW(hr);
Modified: trunk/GME/MgaUtil/DialogList.cpp
==============================================================================
--- trunk/GME/MgaUtil/DialogList.cpp Fri Sep 28 08:27:44 2012 (r2077)
+++ trunk/GME/MgaUtil/DialogList.cpp Wed Oct 3 16:25:03 2012 (r2078)
@@ -44,6 +44,7 @@
//{{AFX_MSG_MAP(CDialogList)
ON_BN_CLICKED(IDC_BUTTON_IGNORE, OnButtonIgnore)
ON_LBN_DBLCLK(IDC_LIST, OnDblclkList)
+ ON_LBN_SELCHANGE(IDC_LIST, OnChangeList)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -80,7 +81,8 @@
m_btnIgnore.ShowWindow( m_hasIgnore ? SW_SHOW : SW_HIDE );
-
+ CWnd* wndOK = this->GetDlgItem(IDOK);
+ wndOK->EnableWindow(FALSE);
return TRUE;
}
@@ -104,3 +106,9 @@
{
OnOK();
}
+
+void CDialogList::OnChangeList(void)
+{
+ CWnd* wndOK = this->GetDlgItem(IDOK);
+ wndOK->EnableWindow(TRUE);
+}
Modified: trunk/GME/MgaUtil/DialogList.h
==============================================================================
--- trunk/GME/MgaUtil/DialogList.h Fri Sep 28 08:27:44 2012 (r2077)
+++ trunk/GME/MgaUtil/DialogList.h Wed Oct 3 16:25:03 2012 (r2078)
@@ -48,6 +48,7 @@
virtual void OnOK();
afx_msg void OnButtonIgnore();
afx_msg void OnDblclkList();
+ afx_msg void OnChangeList();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
Modified: trunk/GME/MgaUtil/MgaResolver.cpp
==============================================================================
--- trunk/GME/MgaUtil/MgaResolver.cpp Fri Sep 28 08:27:44 2012 (r2077)
+++ trunk/GME/MgaUtil/MgaResolver.cpp Wed Oct 3 16:25:03 2012 (r2078)
@@ -1752,7 +1752,7 @@
if (valid_role_count > 0) {
- if (cdl.DoModal() != IDOK) {
+ if (cdl.DoModal() != IDOK || (cdl.mn_selection_index == LB_ERR)) {
return E_ABORT;
} else {
More information about the gme-commit
mailing list