mirror of
				https://github.com/python-LimeReport/LimeReport.git
				synced 2025-11-03 23:21:23 +03:00 
			
		
		
		
	Merge pull request #54 from lchauvinQt/master
Fix random crash while scrolling into the viewer, avoid the index out…
This commit is contained in:
		@@ -16,6 +16,8 @@ namespace LimeReport {
 | 
			
		||||
 | 
			
		||||
bool PreviewReportWidgetPrivate::pageIsVisible(){
 | 
			
		||||
    QGraphicsView* view = q_ptr->ui->graphicsView;
 | 
			
		||||
	if ( m_currentPage-1 >= m_reportPages.size() || m_currentPage <= 0 )
 | 
			
		||||
        return false;
 | 
			
		||||
    PageItemDesignIntf::Ptr page = m_reportPages.at(m_currentPage-1);
 | 
			
		||||
    return page->mapToScene(page->rect()).boundingRect().intersects(
 | 
			
		||||
                view->mapToScene(view->viewport()->geometry()).boundingRect()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user