Skip to content

Commit

Permalink
move Colormap tab next to the Style tab (fix #5018)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Feb 15, 2012
1 parent 0a2d75f commit 0edfd7d
Show file tree
Hide file tree
Showing 2 changed files with 227 additions and 226 deletions.
14 changes: 7 additions & 7 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -157,7 +157,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
mColormapTreeWidget->setHeaderLabels( headerLabels );

//disable colormap tab completely until 'Colormap' is selected (and only for type GrayOrUndefined)
tabPageColormap->setEnabled( false );
tabBar->setTabEnabled( tabBar->indexOf( tabPageColormap ), false );

//
// Set up the combo boxes that contain band lists using the qstring list generated above
Expand Down Expand Up @@ -1726,7 +1726,7 @@ void QgsRasterLayerProperties::on_cboxColorMap_currentIndexChanged( const QStrin

if ( theText == tr( "Pseudocolor" ) || theText == tr( "Freak Out" ) )
{
tabPageColormap->setEnabled( false );
tabBar->setTabEnabled( tabBar->indexOf( tabPageColormap ), false );
rbtnSingleBandMinMax->setEnabled( false );
rbtnSingleBandStdDev->setEnabled( true );
sboxSingleBandStdDev->setEnabled( true );
Expand All @@ -1736,7 +1736,7 @@ void QgsRasterLayerProperties::on_cboxColorMap_currentIndexChanged( const QStrin
}
else if ( theText == tr( "Colormap" ) )
{
tabPageColormap->setEnabled( true );
tabBar->setTabEnabled( tabBar->indexOf( tabPageColormap ), true );
rbtnSingleBandMinMax->setEnabled( false );
rbtnSingleBandStdDev->setEnabled( false );
sboxSingleBandStdDev->setEnabled( false );
Expand All @@ -1746,7 +1746,7 @@ void QgsRasterLayerProperties::on_cboxColorMap_currentIndexChanged( const QStrin
}
else if ( theText == tr( "User Defined" ) )
{
tabPageColormap->setEnabled( false );
tabBar->setTabEnabled( tabBar->indexOf( tabPageColormap ), false );
rbtnSingleBandMinMax->setEnabled( true );
rbtnSingleBandStdDev->setEnabled( true );
sboxSingleBandStdDev->setEnabled( true );
Expand All @@ -1756,7 +1756,7 @@ void QgsRasterLayerProperties::on_cboxColorMap_currentIndexChanged( const QStrin
}
else
{
tabPageColormap->setEnabled( false );
tabBar->setTabEnabled( tabBar->indexOf( tabPageColormap ), false );
rbtnSingleBandMinMax->setEnabled( true );
rbtnSingleBandStdDev->setEnabled( true );
sboxSingleBandStdDev->setEnabled( true );
Expand Down Expand Up @@ -2136,7 +2136,7 @@ void QgsRasterLayerProperties::on_rbtnSingleBand_toggled( bool theState )

if ( cboxColorMap->currentText() == tr( "Pseudocolor" ) )
{
tabPageColormap->setEnabled( true );
tabBar->setTabEnabled( tabBar->indexOf( tabPageColormap ), true );
}

if ( cboxColorMap->currentText() == tr( "Pseudocolor" ) || cboxColorMap->currentText() == tr( "Color Ramp" ) || cboxColorMap->currentText() == tr( "Freak Out" ) || mRasterLayer->rasterType() == QgsRasterLayer::Palette )
Expand Down Expand Up @@ -2214,7 +2214,7 @@ void QgsRasterLayerProperties::on_rbtnThreeBand_toggled( bool theState )
stackedWidget->setCurrentIndex( 0 );
rbtnSingleBand->setChecked( false );
cboxColorMap->setEnabled( false );
tabPageColormap->setEnabled( false );
tabBar->setTabEnabled( tabBar->indexOf( tabPageColormap ), false );

grpRgbBands->setEnabled( true );

Expand Down

0 comments on commit 0edfd7d

Please sign in to comment.