diff --git a/kdvi_multipage.cpp b/kdvi_multipage.cpp index 74688a473..e64102dde 100644 --- a/kdvi_multipage.cpp +++ b/kdvi_multipage.cpp @@ -156,7 +156,7 @@ void KDVIMultiPage::goto_page(int page, int y) scrollView()->ensureVisible(scrollView()->width()/2, (int)(y/window->zoom()) ); emit previewChanged(true); - emit moved_to_page(page); + emit pageInfo(window->totalPages(), page ); } @@ -367,13 +367,11 @@ void KDVIMultiPage::reload() killTimer(timer_id); timer_id = -1; int currsav = window->curr_page(); - window->setFile(m_file); + window->setFile(m_file); window->gotoPage(currsav); + emit pageInfo(window->totalPages(), window->curr_page() ); // We don't use "currsav" here, because that page may no longer exist. In that case, gotoPage already selected another page. - // @@@ Problem here. When kviewshell received this signal, it - // automatically moves to page one. This is very unfortunate - // indeed, I must say. emit numberOfPages(window->totalPages()); scrollView()->resizeContents(window->width(), window->height()); emit previewChanged(true); diff --git a/kdvi_multipage.h b/kdvi_multipage.h index 9e59b7c3e..27c10727d 100644 --- a/kdvi_multipage.h +++ b/kdvi_multipage.h @@ -93,14 +93,15 @@ protected: signals: - /// emitted to indicate the number of pages in the file + /// Emitted to indicate the number of pages in the file. The + //receiver will set the current page to zero and call the + //gotoPage()-method. void numberOfPages(int nr); - /// emitted to indicate that KDVIMultiPage has jumped to a different - //page without being asked to by the kviewshell, i.e. because the - //user clicked on a hyperlink. - void moved_to_page(int nr); - + /// Emitted to indicate the number of pages in the file and the + //current page. The receiver will not change or update the display, + //nor call the gotoPage()-method. + void pageInfo(int nr, int currpg); protected slots: