Stop moving scroll of other images, when active image reaches maximum or minimum scroll positions.
This commit is contained in:
1 parent
b441e32009
commit
56d3a7a684
1 file changed
+18
-1
+18
-1
@@ -312,10 +312,27 @@ Void VideoHandle::zoomToFactorAll( const Double scale, const QPoint center )
|
||||
|
||||
Void VideoHandle::moveAllScrollBars( const QPoint offset )
|
||||
{
|
||||
QPoint newOffset = offset;
|
||||
if( m_arrayActions[VIDEO_ZOOM_LOCK_ACT]->isChecked() )
|
||||
{
|
||||
SubWindowHandle *subWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
|
||||
|
||||
QScrollBar *scrollBar;
|
||||
scrollBar = m_pcCurrentVideoSubWindow->horizontalScrollBar();
|
||||
|
||||
// Do not move other images, if current image reached maximum or minimum scroll position
|
||||
if(scrollBar->value()==scrollBar->maximum() && offset.x()>0)
|
||||
newOffset.setX(0);
|
||||
if(scrollBar->value()==scrollBar->minimum() && offset.x()<0)
|
||||
newOffset.setX(0);
|
||||
|
||||
scrollBar = m_pcCurrentVideoSubWindow->verticalScrollBar();
|
||||
if(scrollBar->value()==scrollBar->maximum() && offset.y()>0)
|
||||
newOffset.setY(0);
|
||||
if(scrollBar->value()==scrollBar->minimum() && offset.y()<0)
|
||||
newOffset.setY(0);
|
||||
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
subWindow = subWindowList.at( i );
|
||||
@@ -323,7 +340,7 @@ Void VideoHandle::moveAllScrollBars( const QPoint offset )
|
||||
continue;
|
||||
else
|
||||
{
|
||||
subWindow->adjustScrollBarByOffset( offset );
|
||||
subWindow->adjustScrollBarByOffset( newOffset );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user