Skip to content
Permalink
Browse files

fix minor issues from nyalldawson review

  • Loading branch information
PeterPetrik committed Jun 27, 2018
1 parent b88b7bc commit c971ab95e7a54fd42aaaa1dce057f3651188c468
@@ -149,7 +149,7 @@ void QgsMeshLayerProperties::addDataset()
if ( ok )
{
syncToLayer();
QgsDebugMsg( "datasets added to the mesh layer" );
QMessageBox::information( this, tr( "Load mesh datasets" ), tr( "Datasets successfully added to the mesh layer" ) );

This comment has been minimized.

Copy link
@nirvn

nirvn Jun 28, 2018

Contributor

What about using a message bar with a timeout to make it go away automatically instead?

This comment has been minimized.

Copy link
@PeterPetrik

PeterPetrik Jun 28, 2018

Author Contributor

I can do that too, but this will be rewritten anyways for 3.4 release once we introduce dataset groups in MDAL. We want to show also list of files that are associated with the mesh, and be able to remove them.

This comment has been minimized.

Copy link
@nirvn

nirvn Jun 28, 2018

Contributor

Ah ok, if it's not permanent then do as you please ;-P

}
else
{
@@ -148,12 +148,20 @@ void QgsMeshRendererActiveDatasetWidget::updateMetadata( int datasetIndex )
const QgsMeshDatasetMetadata meta = mMeshLayer->dataProvider()->datasetMetadata( datasetIndex );
QString msg;
msg += QStringLiteral( "<table>" );
msg += QStringLiteral( "<tr><td>%1</td><td>%2</td></tr>" ).arg( tr( "is on vertices" ) ).arg( meta.isOnVertices() );
msg += QStringLiteral( "<tr><td>%1</td><td>%2</td></tr>" ).arg( tr( "is vector" ) ).arg( meta.isVector() );

msg += QStringLiteral( "<tr><td>%1</td><td>%2</td></tr>" )
.arg( tr( "Is on vertices" ) )
.arg( meta.isOnVertices() ? tr( "Yes" ) : tr( "No" ) );

msg += QStringLiteral( "<tr><td>%1</td><td>%2</td></tr>" )
.arg( tr( "Is vector" ) )
.arg( meta.isVector() ? tr( "Yes" ) : tr( "No" ) );

for ( auto it = meta.extraOptions().constBegin(); it != meta.extraOptions().constEnd(); ++it )
{
msg += QStringLiteral( "<tr><td>%1</td><td>%2</td></tr>" ).arg( it.key() ).arg( it.value() );
}

msg += QStringLiteral( "</table>" );
mActiveDatasetMetadata->setText( msg );
}
@@ -73,11 +73,11 @@ QgsMeshRendererVectorSettings QgsMeshRendererVectorSettingsWidget::settings() co
settings.setFilterMax( val );

// arrow head
val = filterValue( mHeadWidthLineEdit->text(), settings.arrowHeadWidthRatio() );
settings.setArrowHeadWidthRatio( val );
val = filterValue( mHeadWidthLineEdit->text(), settings.arrowHeadWidthRatio() * 100.0 );
settings.setArrowHeadWidthRatio( val / 100.0 );

val = filterValue( mHeadLengthLineEdit->text(), settings.arrowHeadLengthRatio() );
settings.setArrowHeadLengthRatio( val );
val = filterValue( mHeadLengthLineEdit->text(), settings.arrowHeadLengthRatio() * 100.0 );
settings.setArrowHeadLengthRatio( val / 100.0 );

// shaft length
auto method = static_cast<QgsMeshRendererVectorSettings::ArrowScalingMethod>( mShaftLengthComboBox->currentIndex() );
@@ -125,8 +125,8 @@ void QgsMeshRendererVectorSettingsWidget::syncToLayer( )
}

// arrow head
mHeadWidthLineEdit->setText( QString::number( settings.arrowHeadWidthRatio() ) );
mHeadLengthLineEdit->setText( QString::number( settings.arrowHeadLengthRatio() ) );
mHeadWidthLineEdit->setText( QString::number( settings.arrowHeadWidthRatio() * 100.0 ) );
mHeadLengthLineEdit->setText( QString::number( settings.arrowHeadLengthRatio() * 100.0 ) );

// shaft length
mShaftLengthComboBox->setCurrentIndex( settings.shaftLengthMethod() );
@@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>254</width>
<height>260</height>
<height>304</height>
</rect>
</property>
<property name="windowTitle">
@@ -22,14 +22,9 @@
<property name="minimumSize">
<size>
<width>0</width>
<height>55</height>
<height>100</height>
</size>
</property>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
<item>
@@ -6,32 +6,28 @@
<rect>
<x>0</x>
<y>0</y>
<width>328</width>
<height>71</height>
<width>279</width>
<height>84</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QgsDoubleSpinBox" name="mLineWidthSpinBox"/>
</item>
<item>
<widget class="QgsColorButton" name="mColorWidget"/>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Line Width and Color</string>
</property>
</spacer>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QgsDoubleSpinBox" name="mLineWidthSpinBox"/>
</item>
<item>
<widget class="QgsColorButton" name="mColorWidget"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
@@ -19,7 +19,7 @@
<item>
<widget class="QLabel" name="mScalarMinLabel">
<property name="text">
<string>min</string>
<string>Min</string>
</property>
</widget>
</item>
@@ -33,7 +33,7 @@
<item>
<widget class="QLabel" name="mScalarMaxLabel">
<property name="text">
<string>max</string>
<string>Max</string>
</property>
</widget>
</item>
@@ -15,14 +15,19 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QgsDoubleSpinBox" name="mLineWidthSpinBox"/>
</item>
<item>
<widget class="QgsColorButton" name="mColorWidget"/>
</item>
</layout>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Line Width and Color</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QgsDoubleSpinBox" name="mLineWidthSpinBox"/>
</item>
<item>
<widget class="QgsColorButton" name="mColorWidget"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="filterByMagGroupBox">

0 comments on commit c971ab9

Please sign in to comment.
You can’t perform that action at this time.