[GME-commit]
GMESRC/GME/Gme GMEView.cpp,1.155,1.156 ModelGrid.cpp,1.5,1.6
ModelGrid.h,1.4,1.5
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Oct 13 18:03:27 CDT 2004
- Previous message: [GME-commit] GMESRC/GME/ConstraintManager AParser.cpp,1.1,1.2
ConstraintManager.dsp,1.22,1.23 ConstraintMgr.cpp,1.17,1.18
ExpressionChecker.cpp,1.16,1.17
GMEConstraintBrowserDialog.cpp,1.12,1.13
GMEConstraintBrowserDialog.h,1.6,1.7 GMEConstraintEx.cpp,1.14,1.15
GMEConstraintEx.h,1.7,1.8
GMEConstraintPropertiesDialog.cpp,1.13,1.14
GMEConstraintPropertiesDialog.h,1.6,1.7
GMESyntacticSemanticDialog.cpp,1.10,1.11
GMEViolationDialog.cpp,1.15,1.16 GMEViolationDialog.h,1.11,1.12
OCLCommon.cpp,1.4,1.5 OCLCommon.h,1.4,1.5 OCLCommonEx.cpp,1.11,1.12
OCLCommonEx.h,1.8,1.9 OCLContext.h,1.4,1.5
OCLException.cpp,1.9,1.10 OCLException.h,1.8,1.9
OCLFactory.h,1.2,1.3 OCLFeature.h,1.2,1.3
OCLFeatureImplementation.h,1.6,1.7 OCLFormalParameter.h,1.1,1.2
OCLGMECMFacade.cpp,1.27,1.28 OCLGMECMFacade.h,1.12,1.13
OCLGMEECFacade.cpp,1.11,1.12 OCLGMEECFacade.h,1.4,1.5
OCLObject.cpp,1.7,1.8 OCLObject.h,1.4,1.5
OCLObjectExBasic.cpp,1.7,1.8 OCLObjectExBasic.h,1.4,1.5
OCLObjectExGME.cpp,1.9,1.10 OCLParserStatic.cpp,1.5,1.6
OCLParserStatic.h,1.5,1.6 OCLSignature.cpp,1.3,1.4
OCLSignature.h,1.2,1.3 OCLTree.cpp,1.28,1.29 OCLTree.h,1.14,1.15
OCLType.cpp,1.7,1.8 OCLType.h,1.3,1.4 OCLTypeExBasic.cpp,1.17,1.18
OCLTypeExBasic.h,1.3,1.4 OCLTypeExGMECM.cpp,1.27,1.28
OCLTypeExGMECM.h,1.4,1.5 OCLTypeExGMEEC.cpp,1.21,1.22
OCLTypeExGMEEC.h,1.4,1.5 OclConstraint.cpp,1.6,1.7
OclConstraint.h,1.5,1.6 OclObjectExGME.h,1.3,1.4
OclViolation.h,1.3,1.4 StdAfx.h,1.7,1.8
- Next message: [GME-commit]
GMESRC/Java/java/org/isis/gme/bon JBuilderFolder.java,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv22424
Modified Files:
GMEView.cpp ModelGrid.cpp ModelGrid.h
Log Message:
Asp synch bug corrected.
It failed if the objects (whose position is to be synchronized) are not shown by all aspects of their parents.
CVS User: zolmol
Index: GMEView.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.155
retrieving revision 1.156
diff -C2 -d -r1.155 -r1.156
*** GMEView.cpp 27 Sep 2004 22:01:39 -0000 1.155
--- GMEView.cpp 13 Oct 2004 22:03:24 -0000 1.156
***************
*** 5556,5563 ****
void CGMEView::SyncOnGrid(CGuiObject *obj, int aspectIndexFrom, int aspectIndexTo)
{
! CPoint center = obj->GetLocation(aspectIndexFrom).CenterPoint();
! if (!modelGrid.IsAvailable(obj, aspectIndexFrom)) {
! if (!modelGrid.GetClosestAvailable(obj, center)) {
AfxMessageBox("Too Many Models! Internal Program Error!",MB_OK | MB_ICONSTOP);
throw hresult_exception();
--- 5556,5564 ----
void CGMEView::SyncOnGrid(CGuiObject *obj, int aspectIndexFrom, int aspectIndexTo)
{
! // aspectIndexTo might be equal with aspectIndexFrom
! CPoint center = obj->GetLocation(aspectIndexFrom).CenterPoint();//take the pos from the aspFrom (source) aspect
! if (!modelGrid.IsAvailable(obj, aspectIndexFrom)) {//is enough space to occupy the pos taken from the aspFrom aspect?
! if (!modelGrid.GetClosestAvailable(obj, center, aspectIndexTo)) { // if cannot get any position close to the position got above
AfxMessageBox("Too Many Models! Internal Program Error!",MB_OK | MB_ICONSTOP);
throw hresult_exception();
***************
*** 5565,5569 ****
}
obj->SetCenter(center, aspectIndexTo);
! modelGrid.Set(obj);
}
--- 5566,5570 ----
}
obj->SetCenter(center, aspectIndexTo);
! modelGrid.Set(obj, FALSE, aspectIndexTo);
}
Index: ModelGrid.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ModelGrid.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ModelGrid.cpp 25 Aug 2004 20:36:31 -0000 1.5
--- ModelGrid.cpp 13 Oct 2004 22:03:24 -0000 1.6
***************
*** 186,192 ****
// Public methods - accepts objects as parameters
! void CModelGrid::Set(CGuiObject *model,bool reset)
{
! CRect loc = model->GetLocation();
CPoint pt = loc.CenterPoint();
CSize s = loc.Size();
--- 186,198 ----
// Public methods - accepts objects as parameters
! /*
! Mod by ZolMol: If called from CGMEView::SyncOnGrid then
! the object (*model) might not have the same aspects as its parent so
! calling GetLocation or GetNameLocation with default parameter might
! cause null ptr dereferencing
! */
! void CModelGrid::Set(CGuiObject *model,bool reset, int aspIdx)
{
! CRect loc = model->GetLocation( aspIdx);
CPoint pt = loc.CenterPoint();
CSize s = loc.Size();
***************
*** 194,198 ****
if (theApp.labelAvoidance) {
! loc = model->GetNameLocation();
pt = loc.CenterPoint();
s = loc.Size();
--- 200,204 ----
if (theApp.labelAvoidance) {
! loc = model->GetNameLocation( aspIdx);
pt = loc.CenterPoint();
s = loc.Size();
***************
*** 219,228 ****
}
! bool CModelGrid::GetClosestAvailable(CGuiObject *model,CPoint &pt)
{
CRect unionLoc;
! CRect loc = model->GetLocation();
if (theApp.labelAvoidance) {
! CRect nameLoc = model->GetNameLocation();
unionLoc.UnionRect(&loc, &nameLoc);
}
--- 225,240 ----
}
! /*
! Mod by ZolMol: If called from CGMEView::SyncOnGrid then
! the object (*model) might not have the same aspects as its parent so
! calling GetLocation or GetNameLocation with default parameter might
! cause null ptr dereferencing
! */
! bool CModelGrid::GetClosestAvailable(CGuiObject *model,CPoint &pt, int aspIdx)
{
CRect unionLoc;
! CRect loc = model->GetLocation( aspIdx);
if (theApp.labelAvoidance) {
! CRect nameLoc = model->GetNameLocation( aspIdx);
unionLoc.UnionRect(&loc, &nameLoc);
}
***************
*** 248,252 ****
{
ASSERT(right == 0 || down == 0); // no diagonal nudge!
! CRect r = model->GetLocation();
right *= GME_GRID_SIZE;
down *= GME_GRID_SIZE;
--- 260,264 ----
{
ASSERT(right == 0 || down == 0); // no diagonal nudge!
! CRect r = model->GetLocation(); // comment by ZolMol: this is correct since the parent aspect is always valid, and an object is moved (nudged) within the parents aspect only
right *= GME_GRID_SIZE;
down *= GME_GRID_SIZE;
Index: ModelGrid.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/ModelGrid.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ModelGrid.h 19 Jul 2004 17:19:29 -0000 1.4
--- ModelGrid.h 13 Oct 2004 22:03:24 -0000 1.5
***************
*** 20,28 ****
void Clear();
! void Set(CGuiObject *model,bool reset = FALSE);
void Reset(CGuiObject *model);
bool IsAvailable(CGuiObject *model, int aspIdx = -1);
! bool GetClosestAvailable(CGuiObject *model,CPoint &pt);
bool CanNudge(CGuiObject *model,int right,int down);
--- 20,28 ----
void Clear();
! void Set(CGuiObject *model,bool reset = FALSE, int aspIdx = -1);//last param introd by zolmol
void Reset(CGuiObject *model);
bool IsAvailable(CGuiObject *model, int aspIdx = -1);
! bool GetClosestAvailable(CGuiObject *model,CPoint &pt, int aspIdx = -1);//last param introd by zolmol
bool CanNudge(CGuiObject *model,int right,int down);
- Previous message: [GME-commit] GMESRC/GME/ConstraintManager AParser.cpp,1.1,1.2
ConstraintManager.dsp,1.22,1.23 ConstraintMgr.cpp,1.17,1.18
ExpressionChecker.cpp,1.16,1.17
GMEConstraintBrowserDialog.cpp,1.12,1.13
GMEConstraintBrowserDialog.h,1.6,1.7 GMEConstraintEx.cpp,1.14,1.15
GMEConstraintEx.h,1.7,1.8
GMEConstraintPropertiesDialog.cpp,1.13,1.14
GMEConstraintPropertiesDialog.h,1.6,1.7
GMESyntacticSemanticDialog.cpp,1.10,1.11
GMEViolationDialog.cpp,1.15,1.16 GMEViolationDialog.h,1.11,1.12
OCLCommon.cpp,1.4,1.5 OCLCommon.h,1.4,1.5 OCLCommonEx.cpp,1.11,1.12
OCLCommonEx.h,1.8,1.9 OCLContext.h,1.4,1.5
OCLException.cpp,1.9,1.10 OCLException.h,1.8,1.9
OCLFactory.h,1.2,1.3 OCLFeature.h,1.2,1.3
OCLFeatureImplementation.h,1.6,1.7 OCLFormalParameter.h,1.1,1.2
OCLGMECMFacade.cpp,1.27,1.28 OCLGMECMFacade.h,1.12,1.13
OCLGMEECFacade.cpp,1.11,1.12 OCLGMEECFacade.h,1.4,1.5
OCLObject.cpp,1.7,1.8 OCLObject.h,1.4,1.5
OCLObjectExBasic.cpp,1.7,1.8 OCLObjectExBasic.h,1.4,1.5
OCLObjectExGME.cpp,1.9,1.10 OCLParserStatic.cpp,1.5,1.6
OCLParserStatic.h,1.5,1.6 OCLSignature.cpp,1.3,1.4
OCLSignature.h,1.2,1.3 OCLTree.cpp,1.28,1.29 OCLTree.h,1.14,1.15
OCLType.cpp,1.7,1.8 OCLType.h,1.3,1.4 OCLTypeExBasic.cpp,1.17,1.18
OCLTypeExBasic.h,1.3,1.4 OCLTypeExGMECM.cpp,1.27,1.28
OCLTypeExGMECM.h,1.4,1.5 OCLTypeExGMEEC.cpp,1.21,1.22
OCLTypeExGMEEC.h,1.4,1.5 OclConstraint.cpp,1.6,1.7
OclConstraint.h,1.5,1.6 OclObjectExGME.h,1.3,1.4
OclViolation.h,1.3,1.4 StdAfx.h,1.7,1.8
- Next message: [GME-commit]
GMESRC/Java/java/org/isis/gme/bon JBuilderFolder.java,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list