Unverified Commit 57572534 authored by Summer Stapleton's avatar Summer Stapleton Committed by GitHub
Browse files

Merge pull request #346 from TracieSucharski/ipceDocks

Ipce docks
parents 4fb91835 e6a23dfe
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -100,12 +100,7 @@ namespace Isis {
      connect(m_directory, SIGNAL( newWidgetAvailable(QWidget *) ),
              this, SLOT( addView(QWidget *) ) );

      // Currently this connection is only used by Directory when a new active is chosen & user
      // chooses to discard any edits in the old active control which is in a CnetEditorWidget.
      // The only view which will not be updated with the new control are any CnetEditorViews
      // showing the old active control.  CnetEditorWidget classes do not have the ability to reload
      // a control net, so the CnetEditor view displaying the old control is removed, then recreated.
      connect(m_directory, SIGNAL(viewClosed(QWidget *)),
      connect(m_directory, SIGNAL(closeView(QWidget *)),
              this, SLOT(removeView(QWidget *)));

      connect(m_directory, SIGNAL( directoryCleaned() ),
@@ -248,15 +243,16 @@ namespace Isis {


  /**
   * This slot is connected from Directory::viewClosed(QWidget *) signal.  It will
   * close the given view and delete the view. This was written to handle
   * This slot is connected from Directory::closeView(QWidget *) signal.  It will close the given 
   * view and delete the view. 
   *
   * @param view QWidget* The view to close.
   */
  void IpceMainWindow::removeView(QWidget *view) {

    view->close();
    delete view;
    QDockWidget *parentDock = qobject_cast<QDockWidget *>(view->parent());
    removeDockWidget(parentDock);
    delete parentDock;
  }


+9 −4
Original line number Diff line number Diff line
@@ -174,10 +174,15 @@ namespace Isis {
   *                           for ease of use.  Create the QMainWindow initial size to prevent the
   *                           Viewports in CubeDnView from being created as a small size.
   *   @history 2018-07-11 Kaitlyn Lee - Added a value in the project settings that stores whether a
   *                           project was in fullscreen or not when saved. If not, we call
   *                           showNormal() to restore the poject's window size. This also fixes the
   *                           warning/history tabs being misplaced when opening a project.
   *                           Fixes #5175. References #5436.
   *                           project was in fullscreen or not when saved. If not, we call showNormal()
   *                           to restore the poject's window size. This also fixes the warning/history tabs
   *                           being misplaced when opening a project. Fixes #5175. References #5436.
   *   @history 2018-07-12 Tracie Sucharski - Renamed the signal Directory::viewClosed to
   *                           Directory::closeView since Directory does not close the view but
   *                           indicate that the view needs closing.  This signal is now used by
   *                           more than the cnetEditorView, so updated documentation.  Did a little
   *                           cleanup on the removeView  method by removing some code that
   *                           automatically happens due to connection made on destroyed signal.
   *   @history 2018-07-12 Kaitlyn Lee - Removed code that makes the window fullscreen in memory,
   *                           since this was causing a project's window size to not be restored
   *                           when opening from the command line. Decreased the size and changed
+0 −6
Original line number Diff line number Diff line
@@ -2017,7 +2017,6 @@ namespace Isis {
    }

    m_leftMeasure = new ControlMeasure;
    //  Find measure for each file    
    *m_leftMeasure = *((*m_editPoint)[serial]);

    //  If m_leftCube is not null, delete before creating new one
@@ -2067,11 +2066,6 @@ namespace Isis {
    }

    m_rightMeasure = new ControlMeasure;
    //  Find measure for each file
    *m_rightMeasure = *((*m_editPoint)[serial]);

    m_rightMeasure = new ControlMeasure();
    //  Find measure for each file
    *m_rightMeasure = *((*m_editPoint)[serial]);

    //  If m_rightCube is not null, delete before creating new one
+9 −4
Original line number Diff line number Diff line
@@ -555,19 +555,24 @@ namespace Isis {

    foreach(CnetEditorView *cnetEditorView, m_cnetEditorViewWidgets) {
      if (cnetEditorView->control() == project()->activeControl()) {
        emit viewClosed(cnetEditorView);
        project()->activeControl()->closeControlNet();
        project()->activeControl()->openControlNet();
        emit closeView(cnetEditorView);
        addCnetEditorView(project()->activeControl());
      }
    }
  }


/**
 * @description This slot is connected from the signal activeControlSet(bool) emitted from Project. 
 *  
 * 
 * @param newControl bool
 *
 */
  void Directory::newActiveControl(bool newControl) {

    if (newControl && m_controlPointEditViewWidget) {
     emit viewClosed(m_controlPointEditViewWidget);
     emit closeView(m_controlPointEditViewWidget);
     delete m_controlPointEditViewWidget;
    }

+5 −1
Original line number Diff line number Diff line
@@ -259,6 +259,10 @@ namespace Isis {
   *                           objectName needs to be created.
   *   @history 2018-07-09 Kaitlyn Lee - Uncommented code that closes a ControlPointEditView when a new
   *                           active control is set.
   *   @history 2018-07-12 Tracie Sucharski - Renamed viewClosed signal to closeView. Moved
   *                           the close/open control net from reloadActiveControlInCnetEditorView
   *                           to Project::setActiveControl to prevent seg fault when there are
   *                           multiple cnetEditorViews with same cnet.
   */
  class Directory : public QObject {
    Q_OBJECT
@@ -386,7 +390,7 @@ namespace Isis {
      void newDockAvailable(QMainWindow *newWidget);
      void newWidgetAvailable(QWidget *newWidget);

      void viewClosed(QWidget *widget);
      void closeView(QWidget *widget);

      void cnetModified();
      void redrawMeasures();
Loading