Skip to content

Commit

Permalink
Fix margins on photo and web view edit widgets
Browse files Browse the repository at this point in the history
(cherry-picked from ece46d1)
  • Loading branch information
nyalldawson committed Jul 2, 2016
1 parent 28a9b99 commit ef35faf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/editorwidgets/qgsphotowidgetwrapper.cpp
Expand Up @@ -158,6 +158,8 @@ QWidget* QgsPhotoWidgetWrapper::createWidget( QWidget* parent )
layout->addWidget( label, 0, 0, 1, 2 );
layout->addWidget( le, 1, 0 );
layout->addWidget( pb, 1, 1 );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );

container->setLayout( layout );

Expand Down Expand Up @@ -231,7 +233,9 @@ void QgsPhotoWidgetWrapper::setValue( const QVariant& value )
{
if ( value.isNull() )
{
whileBlocking( mLineEdit )->setText( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
mLineEdit->blockSignals( true );
mLineEdit->setText( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
mLineEdit->blockSignals( false );
clearPicture();
}
else
Expand Down
2 changes: 2 additions & 0 deletions src/gui/editorwidgets/qgswebviewwidgetwrapper.cpp
Expand Up @@ -70,6 +70,8 @@ QWidget* QgsWebViewWidgetWrapper::createWidget( QWidget* parent )
layout->addWidget( webView, 0, 0, 1, 2 );
layout->addWidget( le, 1, 0 );
layout->addWidget( pb, 1, 1 );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );

container->setLayout( layout );

Expand Down

0 comments on commit ef35faf

Please sign in to comment.