Skip to content
Permalink
Browse files

Fix issue where in first time useage of QGIS 0.8 newly added layers a…

…re hidden by default.

Adjusted text in qgsoptions to be hopefully more easy to read



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5067 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Mar 19, 2006
1 parent 96b3697 commit be8446be381ece02928ecd774e4e7fcb2dec3e48
Showing with 10 additions and 10 deletions.
  1. +5 −5 src/gui/qgisapp.cpp
  2. +1 −1 src/gui/qgisapp.h
  3. +3 −3 src/gui/qgsoptions.cpp
  4. +1 −1 src/ui/qgsoptionsbase.ui
@@ -347,7 +347,7 @@ void QgisApp::readSettings()
// layers when they are added to the map. This is useful when adding
// many layers and the user wants to adjusty symbology, etc prior to
// actually viewing the layer.
mAddedLayersHidden = settings.readBoolEntry("/qgis/new_layers_visible", true);
mAddedLayersVisible = settings.readBoolEntry("/qgis/new_layers_visible", 1);

// Add the recently accessed project file paths to the File menu
mRecentProjectPaths = settings.readListEntry("/UI/recentProjectsList");
@@ -1821,7 +1821,7 @@ bool QgisApp::addLayer(QStringList const &theLayerQStringList, const QString& en
Q_CHECK_PTR( layer );
// set the visibility based on user preference for newly added
// layers
layer->setVisible(mAddedLayersHidden);
layer->setVisible(mAddedLayersVisible);

if ( ! layer )
{
@@ -1967,7 +1967,7 @@ void QgisApp::addDatabaseLayer()
if (layer->isValid())
{
// set initial visibility based on user preference
layer->setVisible(mAddedLayersHidden);
layer->setVisible(mAddedLayersVisible);

// give it a random color
QgsSingleSymbolRenderer *renderer = new QgsSingleSymbolRenderer(layer->vectorType()); // add single symbol renderer as default
@@ -4323,7 +4323,7 @@ void QgisApp::options()
setTheme(optionsDialog->theme());
setupToolbarPopups(optionsDialog->theme());
// set the visible flag for new layers
mAddedLayersHidden = optionsDialog->newVisible();
mAddedLayersVisible = optionsDialog->newVisible();
QSettings mySettings;
mMapCanvas->enableAntiAliasing(mySettings.value("/qgis/enable_anti_aliasing").toBool());
}
@@ -5286,7 +5286,7 @@ bool QgisApp::addRasterLayer(QStringList const &theFileNameQStringList, bool gui
QgsRasterLayer *layer = new QgsRasterLayer(*myIterator, myBaseNameQString);

// set initial visibility based on user preference
layer->setVisible(mAddedLayersHidden);
layer->setVisible(mAddedLayersVisible);

addRasterLayer(layer);
layer->refreshLegend();
@@ -543,7 +543,7 @@ public slots:
QgsHelpViewer *mHelpViewer;
//! Flag to indicate that newly added layers are not shown on
// the map
bool mAddedLayersHidden;
bool mAddedLayersVisible;
//! menu map (key is name, value is menu id)
std::map<QString, int>mMenuMapByName;
//! menu map (key is menu id, value is name)
@@ -95,7 +95,7 @@ QgsOptions::QgsOptions(QWidget *parent, Qt::WFlags fl) :
cmbTheme->setCurrentText(settings.readEntry("/Themes","default"));
//set teh state of the checkboxes
chkAntiAliasing->setChecked(settings.value("/qgis/enable_anti_aliasing",false).toBool());
chkAddedVisibility->setChecked(!settings.value("/qgis/new_layers_visible",false).toBool());
chkAddedVisibility->setChecked(settings.value("/qgis/new_layers_visible",true).toBool());
cbxHideSplash->setChecked(settings.value("/qgis/hideSplash",false).toBool());
//set the colour for selections
int myRed = settings.value("/qgis/default_selection_color_red",255).toInt();
@@ -147,7 +147,7 @@ void QgsOptions::saveOptions()
settings.writeEntry("/qgis/browser", cmbBrowser->currentText());
settings.writeEntry("/Map/identifyRadius", spinBoxIdentifyValue->value());
settings.writeEntry("/qgis/hideSplash",cbxHideSplash->isChecked());
settings.writeEntry("/qgis/new_layers_visible",!chkAddedVisibility->isChecked());
settings.writeEntry("/qgis/new_layers_visible",chkAddedVisibility->isChecked());
settings.writeEntry("/qgis/enable_anti_aliasing",chkAntiAliasing->isChecked());
if(cmbTheme->currentText().length() == 0)
{
@@ -247,7 +247,7 @@ void QgsOptions::on_pbnSelectProjection_clicked()

bool QgsOptions::newVisible()
{
return !chkAddedVisibility->isChecked();
return chkAddedVisibility->isChecked();
}

void QgsOptions::getEllipsoidList()
@@ -259,7 +259,7 @@
<item row="0" column="0" >
<widget class="QCheckBox" name="chkAddedVisibility" >
<property name="text" >
<string>New la&amp;yers added to the map are not displayed</string>
<string>By default new la&amp;yers added to the map should be displayed</string>
</property>
</widget>
</item>

0 comments on commit be8446b

Please sign in to comment.
You can’t perform that action at this time.