Commit cb80c1fb authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

When switching navigation types, then switching back to the original...

When switching navigation types, then switching back to the original navigation type, qnet will no longer re-filter the data, but keep the old list of filtered data. Fixes #2144.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6277 41f8697f-d340-4b68-9986-7bafba869bb8
parent 8b0d3589
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ using namespace std;

namespace Isis {
  /**
   * Consructs the Navigation Tool window
   * Constructs the Navigation Tool window
   *
   * @param parent The parent widget for the navigation tool
   *
@@ -84,7 +84,7 @@ namespace Isis {
  /**
   * Creates and shows the dialog box for the navigation tool
   *
   * @param parent The parent widget for the navigation dialopg
   * @param parent The parent widget for the navigation dialog
   *
   * @internal
   *   @history  2008-10-29 Tracie Sucharski - Added filter count
@@ -110,7 +110,7 @@ namespace Isis {
    connect(m_listCombo, SIGNAL(activated(int)),
        m_filterStack, SLOT(setCurrentIndex(int)));
    connect(m_listCombo, SIGNAL(activated(int)),
        this, SLOT(resetList()));
        this, SLOT(filterList()));
    connect(m_listCombo, SIGNAL(activated(int)),
        this, SLOT(enableButtons()));

@@ -586,7 +586,6 @@ namespace Isis {
   *     @history  2008-12-09 Tracie Sucharski - Slot to refresh the ListBox
   */
  void QnetNavTool::refreshList() {

    if (m_filtered) {
      filter();
    }
@@ -625,6 +624,11 @@ namespace Isis {

    // We are dealing with points so output the point numbers
    if (m_listCombo->currentIndex() == Points) {
      disconnect(m_listBox, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
          this, SLOT(load(QListWidgetItem *)));
      connect(m_listBox, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
          this, SLOT(editPoint(QListWidgetItem *)), Qt::UniqueConnection);
          
      for (int i = 0; i < m_filteredPoints.size(); i++) {
        QString cNetId = (*controlNet())[m_filteredPoints[i]]->GetId();
        QString itemString = cNetId;
@@ -635,9 +639,14 @@ namespace Isis {
      QString msg = "Filter Count: " + QString::number(m_listBox->count()) +
          " / " + QString::number(controlNet()->GetNumPoints());
      m_filterCountLabel->setText(msg);
      updateEditPoint(m_editPointId);
    }
    // We are dealing with images so write out the cube names
    else if (m_listCombo->currentIndex() == Cubes) {
      disconnect(m_listBox, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
          this, SLOT(editPoint(QListWidgetItem *)));
      connect(m_listBox, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
          this, SLOT(load(QListWidgetItem *)), Qt::UniqueConnection);
      for (int i = 0; i < m_filteredImages.size(); i++) {
        FileName filename = FileName(serialNumberList()->FileName(m_filteredImages[i]));
        QString tempFileName = filename.name();
+4 −0
Original line number Diff line number Diff line
@@ -115,6 +115,10 @@ namespace Isis {
   *   @history  2013-05-14 Tracie Sucharski - Add Qt::UniqueConnection to the connect statements
   *                          in ::resetList to prevent multiple connections between the ListWidget
   *                          and edit point slot and load cube slot.  Fixes #1655.
   *   @history 2015-05-28 Makayla Shepherd and Ian Humphrey - When changing navigation types from
   *                          Points to Cubes, and vice versa, and then back to the original type, 
   *                          the filtered data is saved rather than forcing the user to refilter
   *                          the data. Fixes #2144.
   *
   *
   */