Bug 179752

Summary: Fit to page, width setting is not disabled on uncheck
Product: [Applications] okular Reporter: David Palacio <dpalacio>
Component: generalAssignee: Okular developers <okular-devel>
Status: CLOSED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description David Palacio 2009-01-05 21:39:51 UTC
Version:           0.7.80 (using 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101)), Debian packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.26-1-amd64

After unchecking the Fit Page or Fit Width entry under the View menu Okular keeps the previously checked behaviour active. The problem is in this section of ui/pageview.cpp:

void PageView::slotFitToWidthToggled( bool on )
{
    if ( on ) updateZoom( ZoomFitWidth );
}

void PageView::slotFitToPageToggled( bool on )
{
    if ( on ) updateZoom( ZoomFitPage );
}


Those conditionals should have an else block as

else
{
  updateZoom( ZoomFixed );
}
Comment 1 David Palacio 2009-01-11 18:04:54 UTC
Now that I have visual feedback from the part actions I do not see so much reason to keep this open. Maybe it is a good default.