Skip to content

Commit

Permalink
Make coordinate system toolbar visible after import with multiple coo…
Browse files Browse the repository at this point in the history
…rdinate systems for #361
  • Loading branch information
markummitchell-tu committed Nov 29, 2019
1 parent 9d7aabb commit fc5bc2a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/main/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,17 @@ void MainWindow::fileImport (const QString &fileName,
image,
importType);

if (!loaded) {
if (loaded) {

// Success
if ((m_cmdMediator->document().coordSystemCount() > 1) &&
! m_actionViewCoordSystem->isChecked ()) {

// User is working with multiple coordinate systems so make the coordinate system toolbar visible
m_actionViewCoordSystem->trigger ();
}

} else {

// Failed
if (importType == IMPORT_TYPE_ADVANCED) {
Expand Down Expand Up @@ -886,7 +896,7 @@ void MainWindow::loadCoordSystemListFromCmdMediator ()
// Always start with the first entry selected
m_cmbCoordSystem->setCurrentIndex (0);

// Disable the controls if there is only one entry. Hopefully the user will not even notice it, thus simplifying the interface
// Disable the controls if there is only one entry. Hopefully the user will not even be distracted
bool enable = (m_cmbCoordSystem->count() > 1);
m_cmbCoordSystem->setEnabled (enable);
m_btnShowAll->setEnabled (enable);
Expand Down

0 comments on commit fc5bc2a

Please sign in to comment.