소스 검색

Merge pull request #721 from OTHGMars/guiBmpFix

GuiBitmapCtrl named texture fixes.
Brian Roberts 3 년 전
부모
커밋
3b12fefdf1
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      Engine/source/gui/controls/guiBitmapCtrl.cpp

+ 3 - 2
Engine/source/gui/controls/guiBitmapCtrl.cpp

@@ -98,7 +98,8 @@ bool GuiBitmapCtrl::onWake()
       return false;
    setActive(true);
 
-   setBitmap(getBitmap());
+   if (mBitmapName != StringTable->insert("texhandle"))
+      setBitmap(getBitmap());
    return true;
 }
 
@@ -152,7 +153,7 @@ void GuiBitmapCtrl::setBitmapHandle(GFXTexHandle handle, bool resize)
 {
    mBitmap = handle;
 
-   mBitmapName = String("texhandle");
+   mBitmapName = StringTable->insert("texhandle");
 
    // Resize the control to fit the bitmap
    if (resize)