Skip to content

Commit 04119d8

Browse files
committed
establish that Qwt 6.1 is not currently supported with internal QwtPolar (closes #7495)
1 parent ff51b2c commit 04119d8

File tree

7 files changed

+38
-23
lines changed

7 files changed

+38
-23
lines changed

INSTALL

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Quantum GIS (QGIS)
22
Building QGIS from source - step by step
3-
Tuesday April 02, 2013
3+
Saturday April 06, 2013
44

55

6-
Last Updated: Tuesday April 02, 2013
7-
Last Change : Saturday December 08, 2012
6+
Last Updated: Saturday April 06, 2013
7+
Last Change : Saturday April 06, 2013
88

99

1010
1. Introduction
@@ -103,7 +103,7 @@ Required build deps:
103103
- GEOS >= 3.0
104104
- Sqlite3 >= 3.0.0
105105
- GDAL/OGR >= 1.4.x
106-
- Qwt >= 5.0
106+
- Qwt >= 5.0 & < 6.1
107107
- expat >= 1.95
108108

109109
Optional dependencies:

doc/INSTALL.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
66
<TITLE>Quantum GIS (QGIS)</TITLE>
77

8-
<!-- Included style.css -->
8+
<!-- Included doc/style.css -->
99
<STYLE TYPE="text/css">
1010
body{ background: white;
1111
color: black;
@@ -77,13 +77,13 @@
7777
<DIV CLASS="header" ID="header">
7878
<H1>Quantum GIS (QGIS)</H1>
7979
<H2>Building QGIS from source - step by step</H2>
80-
<H3>Tuesday April 02, 2013</H3>
80+
<H3>Saturday April 06, 2013</H3>
8181
</DIV>
8282

8383
<DIV CLASS="body" ID="body">
8484
<P>
85-
Last Updated: Tuesday April 02, 2013
86-
Last Change : Saturday December 08, 2012
85+
Last Updated: Saturday April 06, 2013
86+
Last Change : Saturday April 06, 2013
8787
</P>
8888
<DIV CLASS="toc">
8989

@@ -210,7 +210,7 @@ <H1>2. Overview</H1>
210210
<LI>GEOS &gt;= 3.0
211211
<LI>Sqlite3 &gt;= 3.0.0
212212
<LI>GDAL/OGR &gt;= 1.4.x
213-
<LI>Qwt &gt;= 5.0
213+
<LI>Qwt &gt;= 5.0 &amp; &lt; 6.1
214214
<LI>expat &gt;= 1.95
215215
</UL>
216216

@@ -3234,5 +3234,5 @@ <H1>9. Authors and Acknowledgments</H1>
32343234

32353235
</DIV>
32363236
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
3237-
<!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
3237+
<!-- cmdline: txt2tags -o doc/INSTALL.html -t html doc/INSTALL.t2t -->
32383238
</BODY></HTML>

doc/msys.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,4 @@ copy contents of pgsql directory from the archive to ``c:\msys\local``
380380

381381
We're done with preparation of MSYS environment. Now you can delete all stuff in ``c:\msys\local\src`` - it takes quite a lot
382382
of space and it's not necessary at all.
383+

doc/osx.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
23
= Building on MacOS X =
34

45
In this approach I will try to avoid as much as possible building dependencies

doc/overview.t2t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Required build deps:
2020
- GEOS >= 3.0
2121
- Sqlite3 >= 3.0.0
2222
- GDAL/OGR >= 1.4.x
23-
- Qwt >= 5.0
23+
- Qwt >= 5.0 & (< 6.1 with internal QwtPolar)
2424
- expat >= 1.95
2525
-
2626

src/app/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ IF(WITH_INTERNAL_QWTPOLAR)
320320

321321
SET(QWTPOLAR_INCLUDE_DIR gps/qwtpolar-0.1)
322322
ELSE(QWT_VERSION_STR VERSION_LESS "6.0.0")
323+
IF(NOT QWT_VERSION_STR VERSION_LESS "6.1.0")
324+
MESSAGE(FATAL_ERROR "Internal QwtPolar does not support Qwt 6.1 and above")
325+
ENDIF(NOT QWT_VERSION_STR VERSION_LESS "6.1.0")
326+
323327
SET(QGIS_APP_SRCS
324328
${QGIS_APP_SRCS}
325329
gps/qwtpolar-1.0/qwt_polar_canvas.cpp

src/gui/raster/qgsrasterhistogramwidget.cpp

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -841,9 +841,9 @@ void QgsRasterHistogramWidget::on_btnHistoMax_toggled()
841841

842842
// local function used by histoPickerSelected(), to get a rounded picked value
843843
// this is sensitive and may not always be correct, needs more testing
844-
QString findClosestTickVal( double target, QwtScaleDiv * scale, int div = 100 )
844+
QString findClosestTickVal( double target, const QwtScaleDiv * scale, int div = 100 )
845845
{
846-
if ( scale == NULL ) return "";
846+
if ( !scale ) return "";
847847

848848
QList< double > minorTicks = scale->ticks( QwtScaleDiv::MinorTick );
849849
QList< double > majorTicks = scale->ticks( QwtScaleDiv::MajorTick );
@@ -875,17 +875,26 @@ QString findClosestTickVal( double target, QwtScaleDiv * scale, int div = 100 )
875875

876876
void QgsRasterHistogramWidget::histoPickerSelected( const QPointF & pos )
877877
{
878-
if ( btnHistoMin->isChecked() )
878+
if ( btnHistoMin->isChecked() || btnHistoMax->isChecked() )
879879
{
880-
leHistoMin->setText( findClosestTickVal( pos.x(), mpPlot->axisScaleDiv( QwtPlot::xBottom ) ) );
881-
applyHistoMin();
882-
btnHistoMin->setChecked( false );
883-
}
884-
else if ( btnHistoMax->isChecked() )
885-
{
886-
leHistoMax->setText( findClosestTickVal( pos.x(), mpPlot->axisScaleDiv( QwtPlot::xBottom ) ) );
887-
applyHistoMax();
888-
btnHistoMax->setChecked( false );
880+
#if defined(QWT_VERSION) && QWT_VERSION>=0x060100
881+
const QwtScaleDiv * scale = &mpPlot->axisScaleDiv( QwtPlot::xBottom );
882+
#else
883+
const QwtScaleDiv * scale = mpPlot->axisScaleDiv( QwtPlot::xBottom );
884+
#endif
885+
886+
if ( btnHistoMin->isChecked() )
887+
{
888+
leHistoMin->setText( findClosestTickVal( pos.x(), scale ) );
889+
applyHistoMin();
890+
btnHistoMin->setChecked( false );
891+
}
892+
else if ( btnHistoMax->isChecked() )
893+
{
894+
leHistoMax->setText( findClosestTickVal( pos.x(), scale ) );
895+
applyHistoMax();
896+
btnHistoMax->setChecked( false );
897+
}
889898
}
890899
if ( QApplication::overrideCursor() )
891900
QApplication::restoreOverrideCursor();

0 commit comments

Comments
 (0)