File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,7 +162,10 @@ class CGLDocument : public CGLSceneDocument
162162
163163public:
164164 bool ShowTitle () const { return m_showTitle; }
165+ void ShowTitle (bool b) { m_showTitle = b; }
166+
165167 bool ShowSubtitle () const { return m_showSubtitle; }
168+ void ShowSubtitle (bool b) { m_showSubtitle = b; }
166169
167170public:
168171 void setModelInfo (const std::string& s) { m_info = s; }
Original file line number Diff line number Diff line change @@ -1407,11 +1407,11 @@ bool CGLView::isTitleVisible() const
14071407
14081408void CGLView::showTitle (bool b)
14091409{
1410- if (m_ptitle)
1411- {
1412- if (b) m_ptitle-> show (); else m_ptitle-> hide ();
1413- repaint ( );
1414- }
1410+ CGLDocument* doc = m_pWnd-> GetGLDocument ();
1411+ if (doc == nullptr ) return ;
1412+
1413+ doc-> ShowTitle (b );
1414+ repaint ();
14151415}
14161416
14171417bool CGLView::isSubtitleVisible () const
@@ -1421,11 +1421,10 @@ bool CGLView::isSubtitleVisible() const
14211421
14221422void CGLView::showSubtitle (bool b)
14231423{
1424- if (m_psubtitle)
1425- {
1426- if (b) m_psubtitle->show (); else m_psubtitle->hide ();
1427- repaint ();
1428- }
1424+ CGLDocument* doc = m_pWnd->GetGLDocument ();
1425+ if (doc == nullptr ) return ;
1426+ doc->ShowSubtitle (b);
1427+ repaint ();
14291428}
14301429
14311430QImage correct_premultiplied_image (const QImage& image)
You can’t perform that action at this time.
0 commit comments