[commit] r1998 - trunk/Paradigms/MetaGME/MetaInterpreter
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Aug 9 12:07:57 CDT 2012
Author: ksmyth
Date: Thu Aug 9 12:07:51 2012
New Revision: 1998
Log:
Name selection dialog should appear if Aspects have different DisplayName, but same Name. Set DisplayName if all DisplayNames and Names are the same. Fixes bug with CyPhyML where TBRequirementsAspect wouldnt have DisplayName set (i.e. second bugfix)
Modified:
trunk/Paradigms/MetaGME/MetaInterpreter/BON2Engine.cpp
Modified: trunk/Paradigms/MetaGME/MetaInterpreter/BON2Engine.cpp
==============================================================================
--- trunk/Paradigms/MetaGME/MetaInterpreter/BON2Engine.cpp Tue Aug 7 14:26:32 2012 (r1997)
+++ trunk/Paradigms/MetaGME/MetaInterpreter/BON2Engine.cpp Thu Aug 9 12:07:51 2012 (r1998)
@@ -679,9 +679,11 @@
FCO resp( it_1->getRespPointer());
EquivBag_Iterator it_2 = m_equivBag.find( fco);
- if( it_2 == m_equivBag.end()) continue;
+ if( it_2 == m_equivBag.end())
+ continue;
- if( !resp) resp = fco;
+ if( !resp)
+ resp = fco;
// m_equivBag[ fco] already exists , is not empty
// it_2->first = fco
@@ -706,6 +708,7 @@
bool is_any_alternative = false;
bool is_def_among_names = false; // when the equivalance's name is used, that is not among the equivs
bool is_reg_among_names = false; // check whether the registry value is among the valid choices
+ std::string anyDispName;
std::set < ObjPointer >::iterator jt = it_2->second.begin();
for( ; jt != it_2->second.end(); ++jt)
{
@@ -720,6 +723,16 @@
if( eqname == regname)
is_reg_among_names = true;
+
+ std::string tmpDispName = (*jt)->getAttribute( Any::DisplayedName_str)->getStringValue();
+ if (tmpDispName != "")
+ {
+ if (anyDispName != "" && anyDispName != tmpDispName)
+ {
+ is_any_alternative = true;
+ }
+ anyDispName = tmpDispName;
+ }
}
}
@@ -748,6 +761,10 @@
}
}
}
+ else if (is_def_among_names)
+ {
+ it_1->setDispName(anyDispName);
+ }
}
if( global_vars.silent_mode)
More information about the gme-commit
mailing list