Skip to content

Commit

Permalink
Merge c275949 into eea8924
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Nov 7, 2018
2 parents eea8924 + c275949 commit af10a94
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var jsonData = { "versions": [
],
"changes": [
{ "change": "<strong>Graph Panel widget:</strong> don't skip the first data point (see issue <a href=\"https://github.com/opencor/opencor/issues/1860\">#1860</a>)." },
{ "change": "<strong>PMR-based windows:</strong> make sure that the spinning wheel is hidden when changing instances of PMR (see issue <a href=\"https://github.com/opencor/opencor/issues/1862\">#1862</a>)." }
{ "change": "<strong>PMR-based windows:</strong> make sure that the spinning wheel is hidden when changing instances of PMR (see issue <a href=\"https://github.com/opencor/opencor/issues/1862\">#1862</a>). Make sure they get populated when being shown after having changed instances of PMR (see issue <a href=\"https://github.com/opencor/opencor/issues/1865\">#1865</a>)." }
]
},
{ "major": 0, "minor": 4, "patch": 1, "day": 20, "month": 5, "year": 2015, "type": 0,
Expand Down
9 changes: 5 additions & 4 deletions src/plugins/organisation/PMRWindow/src/pmrwindowwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ namespace PMRWindow {
PmrWindowWindow::PmrWindowWindow(QWidget *pParent) :
Core::OrganisationWidget(pParent),
mGui(new Ui::PmrWindowWindow),
mFirstTimeRetrievingExposures(true),
mItemDoubleClicked(false)
{
// Set up the GUI
Expand Down Expand Up @@ -234,6 +235,8 @@ void PmrWindowWindow::update(const QString &pPmrUrl)

busy(false, true);

mFirstTimeRetrievingExposures = true;

mPmrUrl = pPmrUrl;

mPmrWebService->update(pPmrUrl);
Expand Down Expand Up @@ -384,10 +387,8 @@ void PmrWindowWindow::retrieveExposures(bool pVisible, bool pForceRetrieval)
// to allow other events, such as the one asking OpenCOR's main window to
// resize itself, to be handled properly)

static bool firstTime = true;

if (pVisible && (firstTime || pForceRetrieval)) {
firstTime = false;
if (pVisible && (mFirstTimeRetrievingExposures || pForceRetrieval)) {
mFirstTimeRetrievingExposures = false;

QTimer::singleShot(0, this, &PmrWindowWindow::actionReloadTriggered);
}
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/organisation/PMRWindow/src/pmrwindowwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class PmrWindowWindow : public Core::OrganisationWidget

QLabel *mPmrInstanceLabel;

bool mFirstTimeRetrievingExposures;

QString mPmrUrl;

PMRSupport::PmrWebService *mPmrWebService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ PmrWorkspacesWindowWindow::PmrWorkspacesWindowWindow(QWidget *pParent) :
mGui(new Ui::PmrWorkspacesWindowWindow),
mInitialized(false),
mSettingsGroup(QString()),
mFirstTimeRetrievingWorkspaces(true),
mAuthenticated(false),
mWaitingForPmrWebService(false)
{
Expand Down Expand Up @@ -303,6 +304,8 @@ void PmrWorkspacesWindowWindow::update(const QString &pPmrUrl)

busy(false, true);

mFirstTimeRetrievingWorkspaces = true;

mPmrUrl = pPmrUrl;

mPmrWebService->update(pPmrUrl);
Expand Down Expand Up @@ -412,10 +415,8 @@ void PmrWorkspacesWindowWindow::retrieveWorkspaces(bool pVisible)
// Note: this will result in the workspace list being populated if we are
// authenticated with PMR...

static bool firstTime = true;

if (pVisible && firstTime) {
firstTime = false;
if (pVisible && mFirstTimeRetrievingWorkspaces) {
mFirstTimeRetrievingWorkspaces = false;

QTimer::singleShot(0, this, &PmrWorkspacesWindowWindow::updateGui);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class PmrWorkspacesWindowWindow : public Core::OrganisationWidget
PMRSupport::PmrWebService *mPmrWebService;
PmrWorkspacesWindowWidget *mPmrWorkspacesWindowWidget;

bool mFirstTimeRetrievingWorkspaces;

QString mPmrUrl;

bool mAuthenticated;
Expand Down

0 comments on commit af10a94

Please sign in to comment.