Skip to content
Permalink
Browse files
rename stuff fix
  • Loading branch information
NEDJIMAbelgacem authored and nyalldawson committed Jan 12, 2022
1 parent ff5bde7 commit 73b48d4515171595b34c35882c33ea98b5870223
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/app/3d/qgs3dviewsmanagerdialog.cpp
@@ -46,7 +46,7 @@ Qgs3DViewsManagerDialog::Qgs3DViewsManagerDialog( QWidget *parent, Qt::WindowFla

connect( m3DViewsListView->selectionModel(), &QItemSelectionModel::currentChanged, this, &Qgs3DViewsManagerDialog::currentChanged );

connect( QgsProject::instance()->get3DViewsManager(), &QgsMapViewsManager::views3DListChanged, this, &Qgs3DViewsManagerDialog::on3DViewsListChanged );
connect( QgsProject::instance()->getViewsManager(), &QgsMapViewsManager::views3DListChanged, this, &Qgs3DViewsManagerDialog::on3DViewsListChanged );
m3DViewsListView->selectionModel()->setCurrentIndex( m3DViewsListView->model()->index( 0, 0 ), QItemSelectionModel::Select );
currentChanged( m3DViewsListView->selectionModel()->currentIndex(), m3DViewsListView->selectionModel()->currentIndex() );
}
@@ -116,7 +116,7 @@ void Qgs3DViewsManagerDialog::removeClicked()

QString viewName = m3DViewsListView->selectionModel()->selectedRows().at( 0 ).data( Qt::DisplayRole ).toString();

QgsProject::instance()->get3DViewsManager()->remove3DView( viewName );
QgsProject::instance()->getViewsManager()->remove3DView( viewName );
if ( Qgs3DMapCanvasDockWidget *w = QgisApp::instance()->get3DMapViewDock( viewName ) )
{
w->close();
@@ -135,7 +135,7 @@ void Qgs3DViewsManagerDialog::renameClicked()
if ( newTitle.isEmpty() )
return;

QgsProject::instance()->get3DViewsManager()->rename3DView( oldTitle, newTitle );
QgsProject::instance()->getViewsManager()->rename3DView( oldTitle, newTitle );

if ( Qgs3DMapCanvasDockWidget *widget = QgisApp::instance()->get3DMapViewDock( oldTitle ) )
{
@@ -161,14 +161,14 @@ void Qgs3DViewsManagerDialog::currentChanged( const QModelIndex &current, const
}

QString viewName = current.data( Qt::DisplayRole ).toString();
bool isOpen = QgsProject::instance()->get3DViewsManager()->is3DViewOpen( viewName );
bool isOpen = QgsProject::instance()->getViewsManager()->is3DViewOpen( viewName );
mShowButton->setEnabled( !isOpen );
mHideButton->setEnabled( isOpen );
}

void Qgs3DViewsManagerDialog::reload()
{
QStringList names = QgsProject::instance()->get3DViewsManager()->get3DViewsNames();
QStringList names = QgsProject::instance()->getViewsManager()->get3DViewsNames();
mListModel->setStringList( names );
}

0 comments on commit 73b48d4

Please sign in to comment.