Skip to content

Commit

Permalink
fixed elevationDatasetsChanged() signal
Browse files Browse the repository at this point in the history
  • Loading branch information
mbernasocchi authored and pka committed Jul 5, 2011
1 parent 17aca2d commit 930d124
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -107,15 +107,13 @@ void GlobePlugin::initGui()
this, SLOT( extentsChanged() ) );
connect( mQGisIface->mapCanvas(), SIGNAL( layersChanged() ),
this, SLOT( layersChanged() ) );
//FIXME: fix sender objact, must be mSettingsDialog
connect( mQGisIface->mapCanvas(), SIGNAL( elevationDatasourcesChanged() ),
connect( &mSettingsDialog, SIGNAL( elevationDatasourcesChanged() ),
this, SLOT( layersChanged() ) );
connect( mQGisIface->mainWindow(), SIGNAL( projectRead() ), this,
SLOT( projectReady() ) );
connect( mQGisIface->mainWindow(), SIGNAL( newProjectCreated() ), this,
SLOT( blankProjectReady() ) );
//FIXME: fix sender objact, must be mSettingsDialog
connect( mQGisIface->mainWindow(), SIGNAL( globeClosed() ), this,
connect( &viewer, SIGNAL( globeClosed() ), this,
SLOT( setGlobeNotRunning() ) );

}
Expand Down Expand Up @@ -272,7 +270,7 @@ void GlobePlugin::projectReady()
void GlobePlugin::blankProjectReady()
{//TODO
QMessageBox m;
m.setText("new");
m.setText("new project loaded");
m.exec();
mSettingsDialog.elevationDatasources()->clearContents();
mSettingsDialog.elevationDatasources()->setRowCount(0);
Expand Down Expand Up @@ -743,6 +741,9 @@ void GlobePlugin::copyFolder( QString sourceFolder, QString destFolder )

void GlobePlugin::setGlobeNotRunning()
{
QMessageBox m;
m.setText("globe not running");
m.exec();
mIsGlobeRunning = false;
}

Expand Down
1 change: 1 addition & 0 deletions src/plugins/globe/globe_plugin_dialog.cpp
Expand Up @@ -309,6 +309,7 @@ void QgsGlobePluginDialog::saveElevationDatasources()
if (keysCount > rowsCount )
{
//elminate superfluous keys
somethingChanged = true;
for (int i = rowsCount; i < keysCount; ++i) {
QString iNum;
iNum.setNum(i);
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/globe/qgsosgviewer.cpp
Expand Up @@ -89,6 +89,9 @@ void QgsGLWidgetAdapter::wheelEvent(QWheelEvent *event)
//reimplement the close event to emit a signal
void QgsGLWidgetAdapter::closeEvent(QCloseEvent *event)
{
QMessageBox m;
m.setText("close event");
m.exec();
emit globeClosed();
event->accept();
}

0 comments on commit 930d124

Please sign in to comment.