[GME-commit] GMESRC/GME/MgaUtil AnnotationNode.cpp,1.5,1.6
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Jul 7 20:13:25 CDT 2005
Update of /project/gme-repository/GMESRC/GME/MgaUtil
In directory escher:/tmp/cvs-serv25842
Modified Files:
AnnotationNode.cpp
Log Message:
Bug Fix for the case when the user inserts an annotation, and specifies aspect visibility information such that in the current aspect the annotation will be hidden.
Previously in such cases the annotation was drawn, and it disappeared after a 'Repaint'
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: AnnotationNode.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/AnnotationNode.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AnnotationNode.cpp 6 Jul 2005 22:11:29 -0000 1.5
--- AnnotationNode.cpp 7 Jul 2005 19:13:22 -0000 1.6
***************
*** 428,437 ****
COMTHROW(aspRoot->put_Value(rootVal));
if (m_aspects[aspIdx].m_isVisible) {
- CComBSTR defName(AN_DEFASPECT);
- CComPtr<IMgaRegNode> defNode;
- COMTHROW(aspRoot->get_SubNodeByName(defName, &defNode));
CComBSTR defVal(AN_VISIBLE_DEFAULT);
COMTHROW(defNode->put_Value(defVal));
}
}
--- 428,444 ----
COMTHROW(aspRoot->put_Value(rootVal));
+ CComBSTR defName(AN_DEFASPECT);
+ CComPtr<IMgaRegNode> defNode;
+ COMTHROW(aspRoot->get_SubNodeByName(defName, &defNode));
if (m_aspects[aspIdx].m_isVisible) {
CComBSTR defVal(AN_VISIBLE_DEFAULT);
COMTHROW(defNode->put_Value(defVal));
+ }
+ else // by default a value is inserted into the AN_DEFASPECT key in the registry
+ { // in CGMEView::OnCntxInsertannotation() so we remove in case the user
+ // did UNCHECK that option
+ long st;
+ COMTHROW( defNode->get_Status( &st));
+ if( st == ATTSTATUS_HERE) COMTHROW( defNode->Clear());
}
}
More information about the GME-commit
mailing list