Unverified Commit 6d6b285d authored by Kristin's avatar Kristin Committed by GitHub
Browse files

Merge pull request #336 from kdl222/savePoint

Removes the parent widget of a cneteditorview when discarding changes and changing an active control
parents c48b8344 b9b67080
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -225,8 +225,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 −3
Original line number Diff line number Diff line
@@ -159,9 +159,10 @@ 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-05 Kaitlyn Lee - Added tilViews() and the menu option to tile all docked/undocked
   *                           and tabbed/untabbed views.

   *   @history 2018-07-09 Kaitlyn Lee - Added tileViews() and the menu option to tile all docked/undocked
   *                           and tabbed/untabbed views. 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