qgis-openproject-5500.diff

patch for this ticket - takubo-saruga-tondara-net -, 2006-05-31 07:11 PM

Download (1.68 KB)

View differences:

src/gui/qgisapp.cpp (working copy)
2669 2669
    qDebug( "%s:%d BAD LAYERS FOUND", __FILE__, __LINE__ );
2670 2670
    QMessageBox::critical( 0x0,
2671
        tr("Unable to open project"), e.what(), QMessageBox::Ok,
2671
        tr("Unable to open project"), QString::fromLocal8Bit(e.what()), QMessageBox::Ok,
2672 2672
        Qt::NoButton );
2673 2673
    mMapCanvas->freeze(false);
src/composer/qgscomposervectorlegend.cpp (working copy)
827 827
    if ( !layer->visible() ) continue;
828 828
    QString id = layer->getLayerID();
829
                path.sprintf("/composition_%d/vectorlegend_%d/layers/layer_%s/", mComposition->id(), mId, (const char *)id.toLocal8Bit().data() );
829
                path.sprintf("/composition_%d/vectorlegend_%d/layers/layer_%s/", mComposition->id(), mId, id );
830 830
    QgsProject::instance()->writeEntry( "Compositions", path+"on", layerOn(id) );
831 831
    QgsProject::instance()->writeEntry( "Compositions", path+"group", layerGroup(id) );
832 832
      }
......
871 871
  QString id = (*it).right( (*it).length() - (idx+1) );
872
  path.sprintf("/composition_%d/vectorlegend_%d/layers/layer_%s/", mComposition->id(), mId, (const char *)id.toLocal8Bit().data() );
872
  path.sprintf("/composition_%d/vectorlegend_%d/layers/layer_%s/", mComposition->id(), mId, id );
873 873
  bool on = QgsProject::instance()->readBoolEntry("Compositions", path+"on", true, &ok);
874 874
  int group = QgsProject::instance()->readNumEntry("Compositions", path+"group", 0, &ok);
875 875
  setLayerOn ( id , on );