Commit 6639a17b authored by devill.tamachan's avatar devill.tamachan

[修正] 起動時にサブビューが有効だと例外で死ぬ

parent a6248425
......@@ -67,37 +67,37 @@ public:
CBZView* GetBZViewFromSubView(CBZSubView *pSubWin)
{
int i = m_arrSubView.Find(pSubWin);
if(i>=0)return m_arrView[i];
if(i>=0 && m_arrView.GetSize()>i)return m_arrView[i];
return NULL;
}
CBZDoc2* GetBZDoc2FromSubView(CBZSubView *pSubWin)
{
int i = m_arrSubView.Find(pSubWin);
if(i>=0)return m_arrDoc[i];
if(i>=0 && m_arrDoc.GetSize()>i)return m_arrDoc[i];
return NULL;
}
CBZSubView* GetSubViewFromBZView(CBZView *pBZView)
{
int i = m_arrView.Find(pBZView);
if(i>=0)return m_arrSubView[i];
if(i>=0 && m_arrSubView.GetSize()>i)return m_arrSubView[i];
return NULL;
}
CBZDoc2* GetBZDoc2FromBZView(CBZView *pBZView)
{
int i = m_arrView.Find(pBZView);
if(i>=0)return m_arrDoc[i];
if(i>=0 && m_arrDoc.GetSize()>i)return m_arrDoc[i];
return NULL;
}
CBZView* GetBZViewFromMiniToolbar(CMiniToolbarView *pMiniToolbar)
{
int i = m_arrMiniToolbarView.Find(pMiniToolbar);
if(i>=0)return m_arrView[i];
if(i>=0 && m_arrView.GetSize()>i)return m_arrView[i];
return NULL;
}
CBZDoc2* GetBZDoc2FromMiniToolbar(CMiniToolbarView *pMiniToolbar)
{
int i = m_arrMiniToolbarView.Find(pMiniToolbar);
if(i>=0)return m_arrDoc[i];
if(i>=0 && m_arrDoc.GetSize()>i)return m_arrDoc[i];
return NULL;
}
CMiniToolbarView* GetMiniToolbarFromBZView(CBZView *pBZView)
......
......@@ -691,7 +691,7 @@ void CBZView::Update()
m_charset = (options.bAutoDetect) ? AutoDetectCharSet() : options.charset;
if(m_charset == CTYPE_EBCDIC)
LoadEbcDicTable();
UpdateSubView();
UpdateMiniToolbar();
Invalidate(FALSE);
......@@ -704,8 +704,15 @@ void CBZView::Update()
void CBZView::UpdateSubView()
{
CMainFrame *pMainFrame = GetMainFrame();
CBZSubView *pSubView = GetSubView();
if(pSubView)pSubView->InitSubView();
if(pMainFrame)
{
BOOL bSubView = (pMainFrame->m_bBmpView || pMainFrame->m_bStructView || pMainFrame->m_bInspectView || pMainFrame->m_bAnalyzerView);
if(bSubView)
{
CBZSubView *pSubView = GetSubView();
if(pSubView)pSubView->InitSubView();
}
}
}
void CBZView::UpdateMiniToolbar()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment