Commit 179628e0 authored by Kaitlyn Lee's avatar Kaitlyn Lee
Browse files

Added m_sortDialog so only one instance of the sorting dialog can be open.

parent 7b536f83
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -75,6 +75,8 @@ namespace Isis {

    m_updatingSelection = false;

    m_sortDialog = NULL;

    m_control = control;
    connect(CnetDisplayProperties::getInstance(), SIGNAL(compositionFinished()),
        this, SLOT(rebuildModels()));
@@ -1015,12 +1017,14 @@ namespace Isis {


  /**
   * Configures the sorting dialog
   * Configures the sorting dialog.
   * If one does not already exist, create it, then show the dialog
   */
  void CnetEditorWidget::configSorting() {
    CnetEditorSortConfigDialog *dialog = new CnetEditorSortConfigDialog(this);
    dialog->setAttribute(Qt::WA_DeleteOnClose);
    dialog->show();
    if (!m_sortDialog) {
      m_sortDialog = new CnetEditorSortConfigDialog(this);
    }
    m_sortDialog->show();
  }


+6 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ namespace Isis {
  class PointTableModel;
  class TableView;
  class TreeView;
  class CnetEditorSortConfigDialog;

  /**
   * This widget provides full editing, filtering and viewing capabilities for
@@ -73,6 +74,8 @@ namespace Isis {
   *                           Fixes #4989.
   *   @history 2018-04-11 Tracie Sucharski - Moved the Xml serialization to the newly created
   *                           CnetEditorView class for ipce.
   *   @history 2018-06-12 Kaitlyn Lee - Added m_sortDialog to keep track if a dialog exists
   *                           so only one instance can be open at a time.
   */
  class CnetEditorWidget : public QWidget {
      Q_OBJECT
@@ -190,6 +193,9 @@ namespace Isis {
      QMap< QString, QList< QAction * > > * m_toolBarActions;   //!< QMap of tool bar actions

      QString *m_settingsPath; //!< Path to read/write settings

      CnetEditorSortConfigDialog *m_sortDialog; //!< Sorting dialog

  };
}