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

When changing navigation type from Points to Cubes, or vice versa, and then...

When changing navigation type from Points to Cubes, or vice versa, and then back to the original type, qnet will no longer re-filter all of the data, but use the old list of filtered data to populate the list of data items. Fixes #2144.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6198 41f8697f-d340-4b68-9986-7bafba869bb8
parent a2daa44a
Loading
Loading
Loading
Loading
+12 −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;
@@ -638,6 +642,10 @@ namespace Isis {
    }
    // 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();
+3 −2
Original line number Diff line number Diff line
@@ -115,7 +115,9 @@ 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-20 Makayla Shepherd and Ian Humphrey - Modified connection on m_listCombo
   *                          from resetList() to filterList(), so changing the navigation type 
   *                          does not reapply filters. Fixes #2144.
   *
   */
  class QnetNavTool : public Tool {
@@ -195,7 +197,6 @@ namespace Isis {
      void createFilters();
//      void listLockedPoints();
      

      QDialog *m_navDialog;
      QPushButton *m_filter;
      bool m_filtered;