diff --git a/app/SubWindowHandle.h b/app/SubWindowHandle.h index f7e01f3..62fb936 100644 --- a/app/SubWindowHandle.h +++ b/app/SubWindowHandle.h @@ -122,11 +122,28 @@ public: virtual Bool mayClose(); + /** + * Get category of the SubWindow + * @return category value based on enum SubWindowCategories + * @note This function should be used with enum SubWindowCategories + * with an & operation and it may belong to several categories + */ UInt getCategory() { return m_uiCategory; } + /** + * Check category of the SubWindow + * @param checkCateory SubWindow category to check against; + * it should be enum SubWindowCategories type + * @return true when SubWindow belong to checkCateory + */ + Bool checkCategory( UInt checkCateory ) + { + return m_uiCategory & checkCateory; + } + Void setSubWindow( PlaYUVerMdiSubWindow* subWindow ) { m_cSubWindow = subWindow; diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index 8f960c3..4247a98 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -123,7 +123,7 @@ Void VideoSubWindow::loadAll() Void VideoSubWindow::refreshSubWindow() { - if( getCategory() == SubWindowHandle::VIDEO_STREAM_SUBWINDOW ) + if( getCategory() & SubWindowHandle::VIDEO_STREAM_SUBWINDOW ) { Int currFrameNum = m_pCurrStream->getCurrFrameNum(); if( !loadFile( m_cFilename, false ) )