Skip to content

Commit

Permalink
better hide unused widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Apr 26, 2012
1 parent f7babeb commit 58c3774
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
17 changes: 11 additions & 6 deletions src/gui/qgsnewhttpconnection.cpp
Expand Up @@ -53,15 +53,20 @@ QgsNewHttpConnection::QgsNewHttpConnection(
cbxIgnoreGetMapURI->setChecked( settings.value( key + "/ignoreGetMapURI", false ).toBool() );
cbxIgnoreGetFeatureInfoURI->setChecked( settings.value( key + "/ignoreGetFeatureInfoURI", false ).toBool() );
}
else
{
cbxIgnoreGetMapURI->setVisible( false );
cbxIgnoreGetFeatureInfoURI->setVisible( false );
}

txtUserName->setText( settings.value( credentialsKey + "/username" ).toString() );
txtPassword->setText( settings.value( credentialsKey + "/password" ).toString() );
}
if ( mBaseKey != "/Qgis/connections-wms/" )
{
cbxIgnoreGetMapURI->setVisible( false );
cbxIgnoreGetFeatureInfoURI->setVisible( false );
mGroupBox->layout()->removeWidget( cbxIgnoreGetMapURI );
mGroupBox->layout()->removeWidget( cbxIgnoreGetFeatureInfoURI );
// Adjust height
int w = width();
adjustSize();
resize(w, height());
}

on_txtName_textChanged( connName );
}
Expand Down
6 changes: 3 additions & 3 deletions src/ui/qgsnewhttpconnectionbase.ui
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>507</width>
<height>322</height>
<width>500</width>
<height>311</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -28,7 +28,7 @@
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="GroupBox1">
<widget class="QGroupBox" name="mGroupBox">
<property name="title">
<string>Connection details</string>
</property>
Expand Down

0 comments on commit 58c3774

Please sign in to comment.