소스 검색

update Incorrect on RightProfile

marauder2k7 4 년 전
부모
커밋
e69f74e001
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      engine/source/gui/guiTypes.cc

+ 5 - 4
engine/source/gui/guiTypes.cc

@@ -477,7 +477,7 @@ GuiBorderProfile * GuiControlProfile::getRightProfile()
    // Attempt to find the profile specified
    if (mRightProfileName)
    {
-      GuiBorderProfile *profile = dynamic_cast<GuiBorderProfile*> (Sim::findObject(mLeftProfileName));
+      GuiBorderProfile *profile = dynamic_cast<GuiBorderProfile*> (Sim::findObject(mRightProfileName));
 
       if (profile)
       {
@@ -486,7 +486,7 @@ GuiBorderProfile * GuiControlProfile::getRightProfile()
    }
    else
    {
-      setLeftProfile(mBorderDefault);
+      setRightProfile(mBorderDefault);
    }
 
    return mBorderRight;
@@ -733,11 +733,12 @@ void GuiControlProfile::decRefCount()
 {
    // Not sure why this was being tripped when
    // switching profiles in guieditor, but...
+   // following the way this works, it seems that a profile
+   // is being removed before it is added =/
 
-   //AssertFatal(mRefCount, "GuiControlProfile::decRefCount: zero ref count");
+   AssertFatal(mRefCount, "GuiControlProfile::%s::decRefCount: zero ref count", this->getName());
    if(!mRefCount)
 	  return;
-
    --mRefCount;
 
 	if(!mRefCount)