Added context menu used to execute a script for multiple cases

For all selected cases, set current case and launch an external Octave process using this current case
p4#: 21742
This commit is contained in:
Magne Sjaastad
2013-05-27 15:38:03 +02:00
parent fe8c155b44
commit fa161607a1
6 changed files with 230 additions and 28 deletions

View File

@@ -1467,11 +1467,13 @@ void RiuMainWindow::storeTreeViewState()
QString treeViewState;
m_treeView->storeTreeViewStateToString(treeViewState);
QString currentIndexString;
RimUiTreeView::storeCurrentIndexToString(*m_treeView, currentIndexString);
QModelIndex mi = m_treeView->currentIndex();
QString encodedModelIndexString;
RimUiTreeView::encodeStringFromModelIndex(mi, encodedModelIndexString);
RiaApplication::instance()->project()->treeViewState = treeViewState;
RiaApplication::instance()->project()->currentModelIndexPath = currentIndexString;
RiaApplication::instance()->project()->currentModelIndexPath = encodedModelIndexString;
}
}
@@ -1492,7 +1494,8 @@ void RiuMainWindow::restoreTreeViewState()
QString currentIndexString = RiaApplication::instance()->project()->currentModelIndexPath;
if (!currentIndexString.isEmpty())
{
RimUiTreeView::applyCurrentIndexFromString(*m_treeView, currentIndexString);
QModelIndex mi = RimUiTreeView::getModelIndexFromString(m_treeView->model(), currentIndexString);
m_treeView->setCurrentIndex(mi);
}
}
}
@@ -1545,7 +1548,7 @@ void RiuMainWindow::updateScaleValue()
}
//--------------------------------------------------------------------------------------------------
///
/// TODO: This function will be moved to a class responsible for handling the application selection concept
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::selectedCases(std::vector<RimCase*>& cases)
{