Skip to content

Commit

Permalink
Bug 2669. Double click switches to the widget of the dependent object.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoops committed Jul 30, 2018
1 parent 1cd9dc4 commit ad9ef8b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions copasi/UI/CQDependencyWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <copasi/function/CExpression.h>

#include <copasi/UI/qtUtilities.h>
#include <copasi/UI/copasiui3window.h>

CQDependencyWidget::CQDependencyWidget(QWidget *parent, const char *name, Qt::WindowFlags f)
: CopasiWidget(parent, name, f)
Expand Down Expand Up @@ -210,7 +211,13 @@ CQDependencyWidget::rowDoubleClicked(int row, int)

if (key.empty()) return;

if (mpListView == NULL) return;
if (mpListView == NULL)
{
mpListView = CopasiUI3Window::getMainWindow()->getMainWidget();
}

mpListView->switchToOtherWidget(C_INVALID_INDEX, key);
if (mpListView != NULL)
{
mpListView->switchToOtherWidget(C_INVALID_INDEX, key);
}
}

0 comments on commit ad9ef8b

Please sign in to comment.