Commit 0cea60ce authored by Kaitlyn Lee's avatar Kaitlyn Lee
Browse files

Changed removeView() to delete the dock widget uncommented code that closes...

Changed removeView() to delete the dock widget uncommented code that closes ControlPointEditView when a new active control is set.
parent 33883f33
Loading
Loading
Loading
Loading
+19 −16
Original line number Diff line number Diff line
@@ -232,8 +232,11 @@ namespace Isis {
   * @param view QWidget* The view to close.
   */
  void IpceMainWindow::removeView(QWidget *view) {
    view->close();
    QDockWidget *parentDock = qobject_cast<QDockWidget *>(view->parent());
    removeDockWidget(parentDock);
    m_viewDocks.removeAll(parentDock);
    delete view;
    delete parentDock;
  }


+4 −1
Original line number Diff line number Diff line
@@ -159,6 +159,9 @@ namespace Isis {
   *                           state can be reset after the IpceMainWindow::show() causes resize and
   *                           move events which in turn cause the project clean flag to be false
   *                           even though the project has just opened.
   *   @history 2018-07-09 Kaitlyn Lee - Changed removeView() to delete the parent dock widget. If we do
   *                           not delete the dock widget, an empty dock widget will remain where the
   *                           view used to be.
   */
  class IpceMainWindow : public QMainWindow {
      Q_OBJECT
+15 −17
Original line number Diff line number Diff line
@@ -561,12 +561,10 @@ namespace Isis {

  void Directory::newActiveControl(bool newControl) {

//  if (newControl && m_controlPointEditViewWidget) {
//    bool closed = m_controlPointEditViewWidget->close();
//    qDebug()<<"Directory::newActiveControl  CPEditor closed = "<<closed;
//    emit viewClosed(m_controlPointEditViewWidget);
//    delete m_controlPointEditViewWidget;
//  }
    if (newControl && m_controlPointEditViewWidget) {
     emit viewClosed(m_controlPointEditViewWidget);
     delete m_controlPointEditViewWidget;
    }

    // If the new active control is the same as what is showing in the cnetEditorWidget, allow
    // editing of control points from the widget, otherwise turnoff from context menu
+3 −2
Original line number Diff line number Diff line
@@ -251,7 +251,8 @@ namespace Isis {
   *                           Fixes #5435.
   *   @history 2018-06-19 Adam Goins - Gave the ControlHealthMonitorView() a reference to the
   *                           directory instance rather than the activeControl. Fixes #5435.
   *
   *   @history 2018-07-09 Kaitlyn Lee - Uncommented code that closes a ControlPointEditView when a new
   *                           active control is set.
   */
  class Directory : public QObject {
    Q_OBJECT