Skip to content

Commit

Permalink
Ensure New Mesh layer GUI behaves correctly when it's resized
Browse files Browse the repository at this point in the history
and remember latest geometry
  • Loading branch information
DelazJ authored and nyalldawson committed Jul 19, 2021
1 parent 6639d73 commit 776592f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 2 additions & 0 deletions src/app/mesh/qgsnewmeshlayerdialog.cpp
Expand Up @@ -24,6 +24,7 @@
#include "qgsproject.h"
#include "qgsmeshlayer.h"
#include "qgsapplication.h"
#include "qgsgui.h"


QgsNewMeshLayerDialog::QgsNewMeshLayerDialog( QWidget *parent, Qt::WindowFlags fl ) : QDialog( parent, fl )
Expand All @@ -38,6 +39,7 @@ QgsNewMeshLayerDialog::QgsNewMeshLayerDialog( QWidget *parent, Qt::WindowFlags f
}

setupUi( this );
QgsGui::enableAutoGeometryRestore( this );
const QList<QgsMeshDriverMetadata> driverList = meta->meshDriversMetadata();

for ( const QgsMeshDriverMetadata &driverMeta : driverList )
Expand Down
25 changes: 9 additions & 16 deletions src/ui/mesh/qgsnewmeshlayerdialogbase.ui
Expand Up @@ -7,13 +7,13 @@
<x>0</x>
<y>0</y>
<width>477</width>
<height>479</height>
<height>450</height>
</rect>
</property>
<property name="windowTitle">
<string>New Mesh Layer</string>
</property>
<layout class="QFormLayout" name="formLayout">
<layout class="QGridLayout" name="gridLayout1">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
Expand Down Expand Up @@ -53,6 +53,12 @@
</item>
<item row="4" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Initialize Mesh Using</string>
</property>
Expand Down Expand Up @@ -105,7 +111,7 @@
</layout>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand All @@ -115,19 +121,6 @@
</property>
</widget>
</item>
<item row="5" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
Expand Down

0 comments on commit 776592f

Please sign in to comment.