Don't allow navigating back to the empty initial pages.

This commit is contained in:
Konstantin Isakov 2011-06-07 00:57:25 -07:00
parent 4e6e0a5e05
commit 0712d8fd96
2 changed files with 19 additions and 4 deletions

View file

@ -790,6 +790,23 @@ void ArticleView::updateMutedContents()
}
}
void ArticleView::back()
{
// Don't allow navigating back to page 0, which is usually the initial
// empty page
if ( ui.definition->history()->currentItemIndex() > 1 )
{
saveHistoryUserData();
ui.definition->back();
}
}
void ArticleView::forward()
{
saveHistoryUserData();
ui.definition->forward();
}
bool ArticleView::hasSound()
{
return ui.definition->page()->mainFrame()->

View file

@ -104,12 +104,10 @@ public:
public slots:
/// Goes back in history
void back()
{ saveHistoryUserData(); ui.definition->back(); }
void back();
/// Goes forward in history
void forward()
{ saveHistoryUserData(); ui.definition->forward(); }
void forward();
public: