Skip to content
Permalink
Browse files

Merge pull request #38484 from timlinux/news-splitter-fix

Fix 'invisible news' issue : after hiding the news it never comes back
  • Loading branch information
nyalldawson committed Aug 31, 2020
2 parents c79c8fc + 2a988e8 commit f0e9a1c4a42090359ce261d4924165005fd592e3
Showing with 10 additions and 1 deletion.
  1. +2 −0 src/app/qgisapp.cpp
  2. +1 −1 src/app/qgsoptions.cpp
  3. +5 −0 src/app/qgswelcomepage.cpp
  4. +2 −0 src/app/qgswelcomepage.h
@@ -12162,6 +12162,8 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString &currentPage, in
double factor = mySettings.value( QStringLiteral( "qgis/magnifier_factor_default" ), 1.0 ).toDouble();
mMagnifierWidget->setDefaultFactor( factor );
mMagnifierWidget->updateMagnification( factor );

mWelcomePage->updateNewsFeedVisibility();
}
}

@@ -678,7 +678,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
mSimplifyAlgorithmComboBox->addItem( tr( "Visvalingam" ), static_cast<int>( QgsVectorSimplifyMethod::Visvalingam ) );
mSimplifyAlgorithmComboBox->setCurrentIndex( mSimplifyAlgorithmComboBox->findData( mSettings->enumValue( QStringLiteral( "/qgis/simplifyAlgorithm" ), QgsVectorSimplifyMethod::NoSimplification ) ) );

// Slightly awkard here at the settings value is true to use QImage,
// Slightly awkward here at the settings value is true to use QImage,
// but the checkbox is true to use QPixmap
chkAddedVisibility->setChecked( mSettings->value( QStringLiteral( "/qgis/new_layers_visible" ), true ).toBool() );
cbxLegendClassifiers->setChecked( mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool() );
@@ -438,6 +438,11 @@ void QgsWelcomePage::updateNewsFeedVisibility()
else
{
mSplitter2->restoreState( QgsSettings().value( QStringLiteral( "Windows/WelcomePage/SplitState2" ), QVariant(), QgsSettings::App ).toByteArray() );
if ( mSplitter2->sizes().first() == 0 )
{
int splitSize = mSplitter2->height() / 2;
mSplitter2->setSizes( QList< int > { splitSize, splitSize} );
}
}
}

@@ -63,6 +63,8 @@ class QgsWelcomePage : public QWidget
void showContextMenuForProjects( QPoint point );
void showContextMenuForTemplates( QPoint point );
void showContextMenuForNews( QPoint point );

public slots:
void updateNewsFeedVisibility();

private:

0 comments on commit f0e9a1c

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