diff --git a/doc/Changelog.md b/doc/Changelog.md index 24715f81..2e1d8713 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -3,6 +3,8 @@ Changelog {#Changelog} # git master (1.1.0) +* [21](https://github.com/BlueBrain/Tide/pull/21): + Bugfix: avoid setting ContentSize to zero on empty deflect::SizeHints event * [18](https://github.com/BlueBrain/Tide/pull/18): Added side buttons to change PDF pages and navigate browser history * [15](https://github.com/BlueBrain/Tide/pull/15): diff --git a/tide/master/PixelStreamWindowManager.cpp b/tide/master/PixelStreamWindowManager.cpp index e59f89f5..9f1edf9f 100644 --- a/tide/master/PixelStreamWindowManager.cpp +++ b/tide/master/PixelStreamWindowManager.cpp @@ -229,13 +229,16 @@ void PixelStreamWindowManager::updateSizeHints( const QString uri, if( !contentWindow ) return; + contentWindow->getContent()->setSizeHints( hints ); + const QSize size( hints.preferredWidth, hints.preferredHeight ); + if( size.isEmpty( )) + return; // External streamers might not have reported an initial size yet if( contentWindow->getContent()->getDimensions().isEmpty( )) contentWindow->getContent()->setDimensions( size ); - contentWindow->getContent()->setSizeHints( hints ); ContentWindowController controller( *contentWindow, _displayGroup ); controller.adjustSize( SIZE_1TO1 ); }