mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
ArticleView: deduplicate expand-optional-parts code
This commit is contained in:
parent
e8a1358bce
commit
de69036e9e
|
@ -2516,15 +2516,7 @@ void ArticleView::showEvent( QShowEvent * ev )
|
|||
void ArticleView::receiveExpandOptionalParts( bool expand )
|
||||
{
|
||||
if( expandOptionalParts != expand )
|
||||
{
|
||||
int n = getArticlesList().indexOf( getActiveArticleId() );
|
||||
if( n > 0 )
|
||||
articleToJump = getCurrentArticle();
|
||||
|
||||
emit setExpandMode( expand );
|
||||
expandOptionalParts = expand;
|
||||
reload();
|
||||
}
|
||||
switchExpandOptionalParts();
|
||||
}
|
||||
|
||||
void ArticleView::switchExpandOptionalParts()
|
||||
|
|
Loading…
Reference in a new issue