From ca0209faff1f2c759092ab8ca64d64122b4912a7 Mon Sep 17 00:00:00 2001 From: Igor Kushnir Date: Sat, 11 Jun 2022 17:33:40 +0300 Subject: [PATCH] Save current article and window position before loading DSL picture Without the added saveHistoryUserData() call, returning back from the enlarged picture page ("gdpicture") restores the current article and the window position that were last saved. At this commit the "gdpicture" behavior is consistent with regular links: returning back from the enlarged picture page sets the article with the picture as current and restores the window position at the time of the click on the picture. --- articleview.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/articleview.cc b/articleview.cc index b0e2d1ae..52952c6f 100644 --- a/articleview.cc +++ b/articleview.cc @@ -1197,7 +1197,10 @@ void ArticleView::openLink( QUrl const & url, QUrl const & ref, Contexts contexts( contexts_ ); if( url.scheme().compare( "gdpicture" ) == 0 ) + { + saveHistoryUserData(); ui.definition->load( url ); + } else if ( url.scheme().compare( "bword" ) == 0 ) {