Accepting request 508768 from KDE:Applications
1 OBS-URL: https://build.opensuse.org/request/show/508768 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/marble?expand=0&rev=91
This commit is contained in:
commit
0778260b17
51
Add-fallback-InputHandler.patch
Normal file
51
Add-fallback-InputHandler.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From c2daba4216d83b90599d4fbb405e1a6ba633c9a8 Mon Sep 17 00:00:00 2001
|
||||
From: Mohammed Nafees <nafees.technocool@gmail.com>
|
||||
Date: Thu, 6 Jul 2017 14:13:44 +0530
|
||||
Subject: Add fallback InputHandler to prevent crash when adding bookmark with
|
||||
UTM view angle
|
||||
|
||||
BUG: 381872
|
||||
---
|
||||
src/lib/marble/LatLonEdit.cpp | 20 +++++++++++---------
|
||||
1 file changed, 11 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/lib/marble/LatLonEdit.cpp b/src/lib/marble/LatLonEdit.cpp
|
||||
index 0d64c59..c000cb6 100644
|
||||
--- a/src/lib/marble/LatLonEdit.cpp
|
||||
+++ b/src/lib/marble/LatLonEdit.cpp
|
||||
@@ -562,21 +562,23 @@ void LatLonEdit::setNotation(GeoDataCoordinates::Notation notation)
|
||||
d->m_inputHandler = new DMInputHandler(d);
|
||||
break;
|
||||
case GeoDataCoordinates::UTM:
|
||||
- /** @todo implement */
|
||||
+ /** @todo see below */
|
||||
break;
|
||||
case GeoDataCoordinates::Astro:
|
||||
- /** @todo implement */
|
||||
+ /** @todo see below */
|
||||
break;
|
||||
}
|
||||
|
||||
- if (d->m_inputHandler) {
|
||||
- d->m_notation = notation;
|
||||
- d->m_inputHandler->setupUi();
|
||||
- d->m_inputHandler->setupMinMax(d->m_dimension);
|
||||
- d->m_inputHandler->setValue(d->m_value);
|
||||
- } else {
|
||||
- Q_ASSERT(false && "Support for this notation has not been implemented yet");
|
||||
+ if (!d->m_inputHandler) {
|
||||
+ /** @todo Temporary fallback to DecimalInputHandler
|
||||
+ * Implement proper handlers for UTM and Astro */
|
||||
+ d->m_inputHandler = new DecimalInputHandler(d);
|
||||
}
|
||||
+
|
||||
+ d->m_notation = notation;
|
||||
+ d->m_inputHandler->setupUi();
|
||||
+ d->m_inputHandler->setupMinMax(d->m_dimension);
|
||||
+ d->m_inputHandler->setValue(d->m_value);
|
||||
}
|
||||
|
||||
void LatLonEdit::checkFloatValueOverflow()
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
109
Fix-plain-map-and-political-map-showing-no-content.patch
Normal file
109
Fix-plain-map-and-political-map-showing-no-content.patch
Normal file
@ -0,0 +1,109 @@
|
||||
From ce6cbb18b1483245ec2e43c84166f68cea60a26b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dennis=20Nienh=C3=BCser?= <nienhueser@kde.org>
|
||||
Date: Mon, 26 Jun 2017 21:57:53 +0200
|
||||
Subject: Fix both plain map and political map showing no content at all
|
||||
|
||||
Both have neither a texture nor a vector tile layer, and hence no
|
||||
tile zoom level was set anymore in geometry layer after f847505. Now
|
||||
a default tile zoom level is calculated in such scenarios.
|
||||
|
||||
BUG: 379297
|
||||
---
|
||||
src/lib/marble/MarbleMap.cpp | 17 ++++++++++-------
|
||||
src/lib/marble/layers/VectorTileLayer.cpp | 9 ++++++---
|
||||
2 files changed, 16 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/lib/marble/MarbleMap.cpp b/src/lib/marble/MarbleMap.cpp
|
||||
index d41c0f1..d62642a 100644
|
||||
--- a/src/lib/marble/MarbleMap.cpp
|
||||
+++ b/src/lib/marble/MarbleMap.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
// Qt
|
||||
#include <QTime>
|
||||
#include <QRegion>
|
||||
+#include <QtMath>
|
||||
|
||||
// Marble
|
||||
#include "layers/FloatItemsLayer.h"
|
||||
@@ -209,9 +210,6 @@ MarbleMapPrivate::MarbleMapPrivate( MarbleMap *parent, MarbleModel *model ) :
|
||||
|
||||
QObject::connect( &m_geometryLayer, SIGNAL(repaintNeeded()),
|
||||
parent, SIGNAL(repaintNeeded()));
|
||||
- QObject::connect(&m_vectorTileLayer, SIGNAL(tileLevelChanged(int)), &m_geometryLayer, SLOT(setTileLevel(int)));
|
||||
- QObject::connect(&m_vectorTileLayer, SIGNAL(tileLevelChanged(int)), &m_placemarkLayer, SLOT(setTileLevel(int)));
|
||||
- QObject::connect(&m_textureLayer, SIGNAL(tileLevelChanged(int)), &m_placemarkLayer, SLOT(setTileLevel(int)));
|
||||
|
||||
/*
|
||||
* Slot handleHighlight finds all placemarks
|
||||
@@ -239,9 +236,11 @@ MarbleMapPrivate::MarbleMapPrivate( MarbleMap *parent, MarbleModel *model ) :
|
||||
parent, SLOT(updateTileLevel()) );
|
||||
QObject::connect( &m_vectorTileLayer, SIGNAL(tileLevelChanged(int)),
|
||||
parent, SLOT(updateTileLevel()) );
|
||||
+ QObject::connect( parent, SIGNAL(radiusChanged(int)),
|
||||
+ parent, SLOT(updateTileLevel()) );
|
||||
+
|
||||
QObject::connect( &m_textureLayer, SIGNAL(repaintNeeded()),
|
||||
parent, SIGNAL(repaintNeeded()) );
|
||||
-
|
||||
QObject::connect( parent, SIGNAL(visibleLatLonAltBoxChanged(GeoDataLatLonAltBox)),
|
||||
parent, SIGNAL(repaintNeeded()) );
|
||||
|
||||
@@ -466,7 +465,8 @@ int MarbleMap::preferredRadiusFloor( int radius )
|
||||
|
||||
int MarbleMap::tileZoomLevel() const
|
||||
{
|
||||
- return qMax(d->m_textureLayer.tileZoomLevel(), d->m_vectorTileLayer.tileZoomLevel());
|
||||
+ auto const tileZoomLevel = qMax(d->m_textureLayer.tileZoomLevel(), d->m_vectorTileLayer.tileZoomLevel());
|
||||
+ return tileZoomLevel >= 0 ? tileZoomLevel : qMin<int>(qMax<int>(qLn(d->m_viewport.radius()*4/256)/qLn(2.0), 1), d->m_styleBuilder.maximumZoomLevel());
|
||||
}
|
||||
|
||||
|
||||
@@ -828,7 +828,10 @@ void MarbleMapPrivate::setDocument( const QString& key )
|
||||
|
||||
void MarbleMapPrivate::updateTileLevel()
|
||||
{
|
||||
- emit q->tileLevelChanged(q->tileZoomLevel());
|
||||
+ auto const tileZoomLevel = q->tileZoomLevel();
|
||||
+ m_geometryLayer.setTileLevel(tileZoomLevel);
|
||||
+ m_placemarkLayer.setTileLevel(tileZoomLevel);
|
||||
+ emit q->tileLevelChanged(tileZoomLevel);
|
||||
}
|
||||
|
||||
// Used to be paintEvent()
|
||||
diff --git a/src/lib/marble/layers/VectorTileLayer.cpp b/src/lib/marble/layers/VectorTileLayer.cpp
|
||||
index 864dddf..505d7a6 100644
|
||||
--- a/src/lib/marble/layers/VectorTileLayer.cpp
|
||||
+++ b/src/lib/marble/layers/VectorTileLayer.cpp
|
||||
@@ -133,7 +133,7 @@ RenderState VectorTileLayer::renderState() const
|
||||
|
||||
int VectorTileLayer::tileZoomLevel() const
|
||||
{
|
||||
- int level = 0;
|
||||
+ int level = -1;
|
||||
for (const auto *mapper: d->m_activeTileModels) {
|
||||
level = qMax(level, mapper->tileZoomLevel());
|
||||
}
|
||||
@@ -163,7 +163,7 @@ bool VectorTileLayer::render(GeoPainter *painter, ViewportParams *viewport,
|
||||
mapper->setViewport(viewport->viewLatLonAltBox());
|
||||
level = qMax(level, mapper->tileZoomLevel());
|
||||
}
|
||||
- if (oldLevel != level) {
|
||||
+ if (oldLevel != level && level >= 0) {
|
||||
emit tileLevelChanged(level);
|
||||
}
|
||||
|
||||
@@ -202,7 +202,10 @@ void VectorTileLayer::setMapTheme(const QVector<const GeoSceneVectorTileDataset
|
||||
}
|
||||
|
||||
d->updateLayerSettings();
|
||||
- emit tileLevelChanged(tileZoomLevel());
|
||||
+ auto const level = tileZoomLevel();
|
||||
+ if (level >= 0) {
|
||||
+ emit tileLevelChanged(level);
|
||||
+ }
|
||||
}
|
||||
|
||||
}
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 6 09:23:33 UTC 2017 - wbauer@tmo.at
|
||||
|
||||
- Drop Fix-utm-enum-value.patch
|
||||
- Add Add-fallback-InputHandler.patch from upstream instead to fix
|
||||
the crash (boo#1044747, kde#381872)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 4 11:37:39 UTC 2017 - wbauer@tmo.at
|
||||
|
||||
- Add Fix-utm-enum-value.patch and reverse-apply it, this upstream
|
||||
commit causes a crash when adding bookmarks if switched to UTM
|
||||
view angles because the necessary handler functions for the
|
||||
dialog are not implemented yet (boo#1044747, kde#381872)
|
||||
- Add Fix-plain-map-and-political-map-showing-no-content.patch to
|
||||
fix the plain map and the political map being not displayed at
|
||||
all (kde#379297)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 07 17:43:01 CEST 2017 - lbeltrame@kde.org
|
||||
|
||||
|
@ -31,6 +31,10 @@ License: LGPL-2.1+
|
||||
Group: Amusements/Teaching/Other
|
||||
Url: http://edu.kde.org
|
||||
Source0: marble-%{version}.tar.xz
|
||||
# PATCH-FIX-UPSTREAM Add-fallback-InputHandler.patch boo#1044747, kde#381872 -- fix crash when opening the "Edit Bookmark" dialog if you set the View Angle to UTM
|
||||
Patch1: Add-fallback-InputHandler.patch
|
||||
# PATCH-FIX-UPSTREAM Fix-plain-map-and-political-map-showing-no-content.patch kde#379297 -- fix display of the plain map and the political map
|
||||
Patch2: Fix-plain-map-and-political-map-showing-no-content.patch
|
||||
BuildRequires: extra-cmake-modules
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gpsd-devel
|
||||
@ -156,6 +160,8 @@ The astronomy library for the satellites plugin.
|
||||
|
||||
%prep
|
||||
%setup -q -n marble-%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
export SUSE_ASNEEDED=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user