[QGIS Commit] r15855 - trunk/qgis/src/gui/symbology-ng
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Apr 30 00:44:57 EDT 2011
Author: telwertowski
Date: 2011-04-29 21:44:57 -0700 (Fri, 29 Apr 2011)
New Revision: 15855
Modified:
trunk/qgis/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
Log:
Workaround for Mac Cocoa freeze when adding a stop to a gradient color ramp (call QColorDialog::getColor after QInputDialog::getInt instead of before).
Modified: trunk/qgis/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp 2011-04-30 00:32:49 UTC (rev 15854)
+++ trunk/qgis/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp 2011-04-30 04:44:57 UTC (rev 15855)
@@ -153,9 +153,13 @@
void QgsVectorGradientColorRampV2Dialog::addStop()
{
+ // Qt 4.7 Mac Cocoa bug: calling QInputDialog::getInt after QColorDialog::getColor will freeze app
+ // workaround: call QColorDialog::getColor below instead of here
+#ifndef QT_MAC_USE_COCOA
QColor color = QColorDialog::getColor( QColor(), this );
if ( !color.isValid() )
return;
+#endif
bool ok;
int val = 50;
@@ -175,6 +179,13 @@
if ( !ok )
return;
+ // Qt 4.7 Mac Cocoa bug workaround: call QColorDialog::getColor here instead of above
+#ifdef QT_MAC_USE_COCOA
+ QColor color = QColorDialog::getColor( QColor(), this );
+ if ( !color.isValid() )
+ return;
+#endif
+
double key = val / 100.0;
QStringList lst;
lst << "." << QString::number( val, 'f', 0 );
More information about the QGIS-commit
mailing list