mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-03 00:14:12 -05:00 
			
		
		
		
	Adjust legend box size when updating. Fix problem where vector class. items were not deleted in update
git-svn-id: http://svn.osgeo.org/qgis/trunk@9277 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
		
							parent
							
								
									fe4b324ca0
								
							
						
					
					
						commit
						ca0eb5c543
					
				@ -368,6 +368,7 @@ void QgsComposerLegendWidget::on_mUpdatePushButton_clicked()
 | 
			
		||||
      mLegend->model()->updateItem(currentItem);
 | 
			
		||||
    }
 | 
			
		||||
  mLegend->update();
 | 
			
		||||
  mLegend->adjustBoxSize();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QgsComposerLegendWidget::on_mUpdateAllPushButton_clicked()
 | 
			
		||||
 | 
			
		||||
@ -279,7 +279,8 @@ void QgsLegendModel::updateLayer(QStandardItem* layerItem)
 | 
			
		||||
  if(mapLayer)
 | 
			
		||||
    {
 | 
			
		||||
      //delete all the entries under layer item
 | 
			
		||||
      for(int i = rowCount() - 1; i >= 0; --i)
 | 
			
		||||
      int currentRowCount = layerItem->rowCount();
 | 
			
		||||
      for(int i = currentRowCount - 1; i >= 0; --i)
 | 
			
		||||
	{
 | 
			
		||||
	  layerItem->removeRow(i);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user