[commit] r2052 - in trunk/GME: GMEActiveBrowser Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Sep 11 11:18:08 CDT 2012
Author: ksmyth
Date: Tue Sep 11 11:18:07 2012
New Revision: 2052
Log:
Change GMEActiveBrowser context menu and PartBrowser drag-n-drop to behave like Model Editor create new FCO: for new FCO Name, use Kind DisplayedName if Kind Name is same as Role Name (i.e. only one role), else use Role DisplayedName
Modified:
trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
trunk/GME/GMEActiveBrowser/GMEActiveBrowser.cpp
trunk/GME/GMEActiveBrowser/StdAfx.cpp
trunk/GME/GMEActiveBrowser/StdAfx.h
trunk/GME/Gme/GMEView.cpp
Modified: trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Tue Sep 11 09:23:58 2012 (r2051)
+++ trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Tue Sep 11 11:18:07 2012 (r2052)
@@ -2341,7 +2341,8 @@
itemcount++;
do
{
- COMTHROW(iitem->GetParent(&parent));
+ objtype_enum objtype;
+ COMTHROW(iitem->GetParent(&parent, &objtype));
_bstr_t bstrid;
COMTHROW(parent->get_ID(bstrid.GetAddress()));
id = bstrid;
@@ -2442,7 +2443,8 @@
do
{
- COMTHROW( iitem->GetParent( &parent));
+ objtype_enum objtype;
+ COMTHROW(iitem->GetParent(&parent, &objtype));
// coll of ptrs
COMTHROW( coll->Append( parent));
Modified: trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp Tue Sep 11 09:23:58 2012 (r2051)
+++ trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp Tue Sep 11 11:18:07 2012 (r2052)
@@ -224,7 +224,15 @@
pMgaContext->BeginTransaction(false);
COMTHROW( ccpParentModel->CreateChildObject(ccpMetaRole,&ccpNewFCO) );
- COMTHROW( ccpNewFCO->put_Name(bszDispName) );
+ if (ccpMetaRole->Name == ccpMetaRole->Kind->Name)
+ {
+ ccpNewFCO->Name = ccpMetaRole->Kind->DisplayedName;
+ }
+ else
+ {
+ ccpNewFCO->Name = ccpMetaRole->DisplayedName;
+ }
+
// Ending transaction
pMgaContext->CommitTransaction();
}
Modified: trunk/GME/GMEActiveBrowser/GMEActiveBrowser.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/GMEActiveBrowser.cpp Tue Sep 11 09:23:58 2012 (r2051)
+++ trunk/GME/GMEActiveBrowser/GMEActiveBrowser.cpp Tue Sep 11 11:18:07 2012 (r2052)
@@ -4,7 +4,6 @@
#include "GMEActiveBrowser.h"
#include <initguid.h>
#include "GMEActiveBrowser_i.c"
-#include "Gme_i.c"
#ifdef _DEBUG
#define new DEBUG_NEW
Modified: trunk/GME/GMEActiveBrowser/StdAfx.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/StdAfx.cpp Tue Sep 11 09:23:58 2012 (r2051)
+++ trunk/GME/GMEActiveBrowser/StdAfx.cpp Tue Sep 11 11:18:07 2012 (r2052)
@@ -3,5 +3,6 @@
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
- #ifdef _ATL_STATIC_REGISTRY
-#endif
+
+#import "MetaLib.tlb" implementation_only no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
+#import "MgaLib.tlb" implementation_only no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
Modified: trunk/GME/GMEActiveBrowser/StdAfx.h
==============================================================================
--- trunk/GME/GMEActiveBrowser/StdAfx.h Tue Sep 11 09:23:58 2012 (r2051)
+++ trunk/GME/GMEActiveBrowser/StdAfx.h Tue Sep 11 11:18:07 2012 (r2052)
@@ -39,10 +39,34 @@
//something, but do not change the name of _Module
extern CComModule _Module;
+// Imports
+#import "CoreLib.tlb" no_implementation no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
+#import "MetaLib.tlb" no_implementation no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
+#import "MgaLib.tlb" no_implementation no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
+#import "MgaUtilLib.tlb" no_implementation no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
+#import "ParserLib.tlb" no_implementation no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
+#import "GMELib.tlb" no_implementation no_namespace raw_method_prefix("") high_method_prefix("__") no_registry
+
+#include "CommonImport.h"
+
+#define cpp_quote(x)
+#include "Interfaceversion.h"
+#undef cpp_quote
+typedef GMEInterfaceVersion_enum GMEInterfaceVersion;
+
+// Don't load the MIDL-generated headers
+#define __Core_h__
+#define __Meta_h__
+#define __Mga_h__
+#define __MgaUtil_h__
+#define __MgaUtilLib_h__
+#define __Parser_h__
+#define __Gme_h__
+#define __GmeLib_h__
+#define IID_IMgaDataSource __uuidof(IMgaDataSource)
+// End Imports
+
#include <atlcom.h>
-#include "..\Interfaces\Meta.h"
-#include "..\Interfaces\MgaUtil.h"
-#include "..\Interfaces\GME.h"
#include "CommonError.h"
#include "CommonMfc.h"
#include "CommonMgaTrukk.h"
Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp Tue Sep 11 09:23:58 2012 (r2051)
+++ trunk/GME/Gme/GMEView.cpp Tue Sep 11 11:18:07 2012 (r2052)
@@ -3868,10 +3868,15 @@
if(ok) {
CComPtr<IMgaFCO> child;
COMTHROW(currentModel->CreateChildObject(metaRole,&child));
- CComBSTR nm;
- COMTHROW(metaRole->get_DisplayedName(&nm));
- COMTHROW(child->put_Name(nm));
- CComBSTR bstr;
+
+ if (metaRole->Name == metaRole->Kind->Name)
+ {
+ child->Name = metaRole->Kind->DisplayedName;
+ }
+ else
+ {
+ child->Name = metaRole->DisplayedName;
+ }
CString newID;
COMTHROW(child->get_ID(PutOut(newID)));
newObjectIDs.AddHead(newID);
More information about the gme-commit
mailing list