Bug 53693 - scrolling with the mouse-wheel skips pages
Summary: scrolling with the mouse-wheel skips pages
Status: RESOLVED FIXED
Alias: None
Product: kghostview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Wilco Greven
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-30 23:00 UTC by Mark Gibson
Modified: 2003-06-04 20:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Gibson 2003-01-30 23:00:21 UTC
Version:            (using KDE KDE 3.1)
Installed from:    SuSE RPMs
Compiler:          GCC 3.2 
OS:          Linux

In kghostview (0.13.2 and earlier versions):

After opening a document in kghostview.
I scroll down the page using the mouse wheel, on reaching the bottom it will skip
to the next page - ok, so this works fine.
If I open a second document, the mouse wheel will skip two pages at the bottom of the page!!
After opening a third document, it will skip three pages... and so on, skipping an
extra page for each document I open!
(It also happens on the way up too)
I have to quit kghostview and reload it for each document I wish to read
(I like mouse wheels :).
Comment 1 Luís Pedro Coelho 2003-04-08 21:25:16 UTC
Wheel mouse handling has changed in both BRANCH and HEAD. I don't know if it 
fixed this particular problem and don't have a wheel mouse, so I ask whether any 
can check it out. 
 
thank you, 
luis pedro coelho 
Comment 2 Luís Pedro Coelho 2003-06-04 18:25:30 UTC
I finally installed a wheel-mouse I had lying around (you got to love open source: 
it's easy to get a webserver going, but making a mouse work takes an hour of man + 
google + edit config files in random fashion :). 
 
I can see this bug in HEAD, but not in 3.1.2. It might be related to the commit I did 
this mourning. Will try to investigate. 
Comment 3 Luís Pedro Coelho 2003-06-04 18:27:57 UTC
I meant the other way around: I can reproduce in 3.1.2 but not in HEAD.  
 
sorry, 
luis  
Comment 4 Luís Pedro Coelho 2003-06-04 19:06:35 UTC
 In fact, the exact behaviour the original report speaks of is only really visible in 
3.0.0. Both HEAD and 3.1.2 seems to skip pages after opening several files, but not 
in a so orderly fashion.  
I can consistently reproduce by opening several files in a row that eventually I will 
only be able to see the even numbered pages, but I don't really see the full logic 
yet. 
 
Comment 5 Luís Pedro Coelho 2003-06-04 20:42:21 UTC
Subject: KDE_3_1_BRANCH: kdegraphics/kghostview

CVS commit by luis_pedro: 

Backport of fix: do initialization in the constructor so as not to do it twice resulting in slots being
	called several times.

CCMAIL: 53693-close@bugs.kde.org


  M +7 -6      kgv_view.cpp   1.110.2.5


--- kdegraphics/kghostview/kgv_view.cpp  #1.110.2.4:1.110.2.5
@@ -239,4 +239,11 @@ KGVPart::KGVPart( QWidget* parentWidget,
              this, SLOT( slotPageMoved( int, int ) ) );
 
+    connect( _pageView, SIGNAL( nextPage() ), SLOT( slotNextPage() ));
+    connect( _pageView, SIGNAL( prevPage() ), SLOT( slotPrevPage() ));
+    connect( _pageView, SIGNAL( zoomIn() ), SLOT( slotZoomIn() ));
+    connect( _pageView, SIGNAL( zoomOut() ), SLOT( slotZoomOut() ));
+    connect( _pageView, SIGNAL( ReadUp() ), SLOT( slotReadUp() ));
+    connect( _pageView, SIGNAL( ReadDown() ), SLOT( slotReadDown() ));
+
     readSettings();
 
@@ -538,10 +545,4 @@ void KGVPart::slotOpenFileCompleted()
         _docManager->goToPage( _currentPage );
         stateChanged( "documentState" );
-        connect( _pageView, SIGNAL( nextPage() ), SLOT( slotNextPage() ));
-        connect( _pageView, SIGNAL( prevPage() ), SLOT( slotPrevPage() ));
-        connect( _pageView, SIGNAL( zoomIn() ), SLOT( slotZoomIn() ));
-        connect( _pageView, SIGNAL( zoomOut() ), SLOT( slotZoomOut() ));
-        connect( _pageView, SIGNAL( ReadUp() ), SLOT( slotReadUp() ));
-        connect( _pageView, SIGNAL( ReadDown() ), SLOT( slotReadDown() ));
         if ( !_fileWatcher->contains( m_file ) ) 
             _fileWatcher->addFile( m_file );