Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Apr 18, 2018
2 parents 9dde3e7 + 022d71c commit ae667ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
Expand Up @@ -180,7 +180,8 @@ void CsvDataStoreExporter::execute(QString &pErrorMessage) const
else
rowData += ',';

if (dataStore->voi()->value(runsIndex[j], j) == voiValue) {
if ( (runsIndex[j] < dataStore->size(j))
&& (dataStore->voi()->value(runsIndex[j], j) == voiValue)) {
rowData += QString::number(variableRun->value(runsIndex[j], j));

updateRunsIndex[j] = true;
Expand Down
9 changes: 6 additions & 3 deletions src/plugins/miscellaneous/Core/src/commonwidget.cpp
Expand Up @@ -202,11 +202,14 @@ void CommonWidget::setBusyWidgetProgress(double pProgress)

void CommonWidget::processEvents()
{
// Process events, but only if our parent is visible, and we or our central
// widget is not showing our or its busy widget
// Process events, but only if our parent is visible and updates are enabled
// for it, and we or our central widget is not showing our or its busy
// widget

if (mParent->isVisible() && !mBusyWidget && !centralWidget()->isBusyWidgetVisible())
if ( mParent->isVisible() && mParent->updatesEnabled()
&& !mBusyWidget && !centralWidget()->isBusyWidgetVisible()) {
QCoreApplication::processEvents();
}
}

//==============================================================================
Expand Down
Expand Up @@ -1122,7 +1122,7 @@ void Property::setColorValue(const QPoint &pPoint)
// time round, we will have to click anywhere in OpenCOR for
// OpenCOR to get the focus back...

QCoreApplication::processEvents();
mOwner->processEvents();
}
}

Expand Down
Expand Up @@ -194,7 +194,7 @@ void FileBrowserWindowWidget::loadSettings(QSettings *pSettings)
// Note: indeed, to process pending events only in directoryLoaded() is not
// good enough (anymore?!) on macOS...

QCoreApplication::processEvents();
processEvents();

// Let the user know of a few default things about ourselves by emitting a
// few signals
Expand Down Expand Up @@ -535,7 +535,7 @@ void FileBrowserWindowWidget::directoryLoaded(const QString &pPath)
// Windows doesn't need this, Linux and macOS definitely do and it can't
// harm having it for all three environments)

QCoreApplication::processEvents();
processEvents();

QModelIndex initPathDirIndex = mModel->index(mInitPathDir);

Expand Down

0 comments on commit ae667ff

Please sign in to comment.