1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
commit 79c39f45468bace95169d1ba959884ce27087d1e
Author: Torsten Rahn <rahn@kde.org>
Date: Wed Feb 8 17:18:15 2012 +0100
Fixes for Marble with Qt 4.8:
- Provide proper colors for Marble's Atlas, Temperature,
Precipitation and Venus/Mars Topography maps.
( due to introduction of QImage::fill( QColor ) overload )
- Show proper icons for MarbleLegendBrowser
( due to new interpretation of the "current directory" in
QTextBrowser )
diff --git a/src/lib/MarbleLegendBrowser.cpp b/src/lib/MarbleLegendBrowser.cpp
index 4a25095..ffa0a23 100644
--- a/src/lib/MarbleLegendBrowser.cpp
+++ b/src/lib/MarbleLegendBrowser.cpp
@@ -130,26 +130,24 @@ void MarbleLegendBrowser::loadLegend()
t.start();
// Read the html string.
- QString finalHtml;
+ QString legendPath;
// Check for a theme specific legend.html first
if ( d->m_marbleModel != 0 && d->m_marbleModel->mapTheme() != 0 )
{
GeoSceneDocument *currentMapTheme = d->m_marbleModel->mapTheme();
- QString customLegendPath = MarbleDirs::path( "maps/" +
+ legendPath = MarbleDirs::path( "maps/" +
currentMapTheme->head()->target() + '/' +
currentMapTheme->head()->theme() + "/legend.html" );
- if ( !customLegendPath.isEmpty() )
- finalHtml = readHtml( QUrl::fromLocalFile( customLegendPath ) );
- else
- finalHtml.clear();
}
-
- if ( finalHtml.isEmpty() ) {
- finalHtml = readHtml( QUrl::fromLocalFile( MarbleDirs::path( "legend.html" ) ) );
+ if ( legendPath.isEmpty() ) {
+ legendPath = MarbleDirs::path( "legend.html" );
}
+ QString finalHtml = readHtml( QUrl::fromLocalFile( legendPath ) );
+ finalHtml.replace( QString( "./" ), legendPath.section( '/', 0, -2 ) + '/' );
+
// Generate some parts of the html from the MapTheme <Legend> tag.
const QString sectionsHtml = generateSectionsHtml();
diff --git a/src/lib/TextureColorizer.cpp b/src/lib/TextureColorizer.cpp
index 4a4f8f3..d0deead 100644
--- a/src/lib/TextureColorizer.cpp
+++ b/src/lib/TextureColorizer.cpp
@@ -176,7 +176,7 @@ void TextureColorizer::colorize( QImage *origimg, const ViewportParams *viewport
m_coastImage = QImage( viewport->size(), QImage::Format_RGB32 );
// update coast image
- m_coastImage.fill( Qt::transparent );
+ m_coastImage.fill( QColor( 0, 0, 255, 0) );
bool doClip = false; //assume false
switch( viewport->projection() ) {
|