Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into oms
Browse files Browse the repository at this point in the history
  • Loading branch information
Adeel Asghar committed May 9, 2018
2 parents a86472e + afcb605 commit b0383b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -2500,7 +2500,8 @@ QString OMCProxy::makeDocumentationUriToFileName(QString documentation)
}
// go through the list of links and convert them if needed.
foreach (QString attribute, attributeMatches) {
if (attribute.startsWith("modelica://")) {
// ticket:4923 Modelica specification allows both modelica:// and Modelica://
if (attribute.startsWith("modelica://") || attribute.startsWith("Modelica://")) {
QString fileName = uriToFilename(attribute);
#ifdef WIN32
documentation = documentation.replace(attribute, "file:///" + fileName);
Expand Down
15 changes: 6 additions & 9 deletions OMEdit/OMEditGUI/Plotting/VariablesWidget.cpp
Expand Up @@ -1500,7 +1500,7 @@ void VariablesWidget::plotVariables(const QModelIndex &index, qreal curveThickne
}
}
}
} else if (pPlotWindow->getPlotType() == PlotWindow::PLOTPARAMETRIC) { // if plottype is PLOTPARAMETRIC then
} else if (pPlotWindow->getPlotType() == PlotWindow::PLOTPARAMETRIC || pPlotWindow->getPlotType() == PlotWindow::PLOTARRAYPARAMETRIC) { // if plottype is PLOTPARAMETRIC or PLOTARRAYPARAMETRIC then
// check the item checkstate
if (pVariablesTreeItem->isChecked()) {
VariablesTreeItem *pVariablesTreeRootItem = pVariablesTreeItem;
Expand Down Expand Up @@ -1534,7 +1534,7 @@ void VariablesWidget::plotVariables(const QModelIndex &index, qreal curveThickne
pPlotWindow->setVariablesList(QStringList() << mPlotParametricVariables.last().at(0) << mPlotParametricVariables.last().at(2));
if (pPlotWindow->getPlotType() == PlotWindow::PLOTPARAMETRIC)
pPlotWindow->plotParametric(pPlotCurve);
else/* ie. (pPlotWindow->getPlotType() == PlotWindow::PLOTARRAYPARAMETRIC)*/{
else /* ie. (pPlotWindow->getPlotType() == PlotWindow::PLOTARRAYPARAMETRIC)*/{
double timePercent = mpSimulationTimeSlider->value();
pPlotWindow->plotArrayParametric(timePercent,pPlotCurve);
}
Expand Down Expand Up @@ -1771,27 +1771,24 @@ void VariablesWidget::simulationTimeChanged(int timePercent)
{
PlotWindow *pPlotWindow = MainWindow::instance()->getPlotWindowContainer()->getCurrentWindow();
if (pPlotWindow) {
//PLOT, PLOTALL, PLOTPARAMETRIC, PLOTARRAY, PLOTARRAYPARAMETRIC}
PlotWindow::PlotType plotType = pPlotWindow->getPlotType();
if (plotType == PlotWindow::PLOT ||
plotType == PlotWindow::PLOTALL ||
plotType == PlotWindow::PLOTPARAMETRIC) {
return;
}
QList<PlotCurve*> curves = pPlotWindow->getPlot()->getPlotCurvesList();
if (plotType == PlotWindow::PLOTARRAY) {
QList<PlotCurve*> curves = pPlotWindow->getPlot()->getPlotCurvesList();
foreach (PlotCurve* curve, curves) {
QString varName = curve->getYVariable();
pPlotWindow->setVariablesList(QStringList(varName));
pPlotWindow->plotArray(timePercent, curve);
}
} else if (plotType == PlotWindow::PLOTARRAYPARAMETRIC) {
QList<PlotCurve*> curves = pPlotWindow->getPlot()->getPlotCurvesList();
foreach (PlotCurve* curve, curves) {
QString xVarName = curve->getXVariable();
QString yVarName = curve->getYVariable();
pPlotWindow->setVariablesList({xVarName,yVarName});
pPlotWindow->plotArrayParametric(timePercent, curve);
}
} else {
return;
}
}
}
Expand Down

0 comments on commit b0383b2

Please sign in to comment.