diff --git a/src/Gui/AbstractView.cpp b/src/Gui/AbstractView.cpp index 66818a2ea..dfe8b3e39 100644 --- a/src/Gui/AbstractView.cpp +++ b/src/Gui/AbstractView.cpp @@ -476,11 +476,8 @@ AbstractView::importPerspective(QString filename) if (newone) { appendPerspective(newone); return true; - } else { - // no valid perspective found for this view... (maybe its for another type of view) - QMessageBox::information(this, tr("Perspective Import"), tr("No perspectives found that are appropriate for the current view.")); - return false; } + return false; } void diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 2be564742..e3eb619c1 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -965,13 +965,16 @@ MainWindow::importPerspective() pactive = true; if (current->importPerspective(fileName)) { - // on success we select the new one - resetPerspective(view); + // on success we select the new one forcefully, as the view hasn't changed. + resetPerspective(view, true); //current->setPerspectives(perspectiveSelector); // and select remember pactive is true, so we do the heavy lifting here perspectiveSelector->setCurrentIndex(current->perspectives_.count()-1); current->perspectiveSelected(perspectiveSelector->currentIndex()); + } else { + // no valid perspective found for this view... (maybe its for another type of view) + QMessageBox::information(this, tr("Perspective Import"), tr("No perspectives found that are appropriate for the current view.")); } pactive = false; } diff --git a/src/Gui/PerspectiveDialog.cpp b/src/Gui/PerspectiveDialog.cpp index 6307d80dc..ba463bc7a 100644 --- a/src/Gui/PerspectiveDialog.cpp +++ b/src/Gui/PerspectiveDialog.cpp @@ -330,6 +330,9 @@ PerspectiveDialog::importPerspectiveClicked() // new one added emit perspectivesChanged(); + } else { + // no valid perspective found for this view... (maybe its for another type of view) + QMessageBox::information(this, tr("Perspective Import"), tr("No perspectives found that are appropriate for the current view.")); } } }