Commit 39b8938a authored by Dennis Nienhüser's avatar Dennis Nienhüser

Fix crash when using QCoreApplication and libmarblewidget-qt5

Do not use QApplication::palette() in statically initialized variables
parent c9bf0b77
......@@ -38,9 +38,7 @@ const int AreaAnnotation::selectedDim = 15;
const int AreaAnnotation::mergedDim = 20;
const int AreaAnnotation::hoveredDim = 20;
const QColor AreaAnnotation::regularColor = Oxygen::aluminumGray3;
const QColor AreaAnnotation::selectedColor = QApplication::palette().highlight().color();
const QColor AreaAnnotation::mergedColor = Oxygen::emeraldGreen6;
const QColor AreaAnnotation::hoveredColor = QApplication::palette().highlight().color();
AreaAnnotation::AreaAnnotation( GeoDataPlacemark *placemark ) :
SceneGraphicsItem( placemark ),
......@@ -742,6 +740,8 @@ void AreaAnnotation::drawNodes( GeoPainter *painter )
QColor glowColor = QApplication::palette().highlightedText().color();
glowColor.setAlpha(120);
auto const selectedColor = QApplication::palette().highlight().color();
auto const hoveredColor = selectedColor;
for ( int i = 0; i < outerRing.size(); ++i ) {
// The order here is important, because a merged node can be at the same time selected.
if ( m_outerNodesList.at(i).isBeingMerged() ) {
......
......@@ -228,9 +228,7 @@ private:
static const int mergedDim;
static const int hoveredDim;
static const QColor regularColor;
static const QColor selectedColor;
static const QColor mergedColor;
static const QColor hoveredColor;
const ViewportParams *m_viewport;
bool m_regionsInitialized;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment