Bug report #1450
Adding the Attribute Table DockWidget doesn't update canvas extent
|Affected QGIS version:||Regression?:||No|
|Operating System:||Debian||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11510|
When opening the attribute table as a DockWidget, the map canvas is not being refreshed, so whole contents disappears. Then if I refresh it or zoom, it's back, but the canvas extent is not updated - it still includes the area occupied by the table now. As a result, zoomToFullExtent hides a part of contents 'behind' the attribute table widget. I can't find what mathod should be called to update the extents.
QgsMapCanvas::extent() returns old values
QgsMapCanvas::zoomToFullExtent() zooms to this old (too extensive) extent
QgsMapCanvas::updateFullExtent() doesn't change anything
QgsMapCanvas::adjustSize() helps, but creates artifacts
Note that if I touch the window layout, for example resize any dock or whole main window, the canvas extent becomes updated and everything begins to work properly.
I set the 'must fix for release', because it's just an ugly behaviour making a bad impression on users and probably something easy to fix.
#2 Updated by Borys Jurgiel over 11 years ago
- Resolution deleted (
- Status changed from Closed to Feedback
It's only partially fixed. When opening the attribute table, the map doens't disappear anymore (thanks), but is still covered by the table. The 'Update to full extent' button doesn't help. The map extent still contain the area covered by the table. But if you touch the window layout, the extent is immediatelly updated and the map is zoomed out.