Commit 5a82a364 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Function added to AlgorithmSelector to launch the execution of a tool...

Function added to AlgorithmSelector to launch the execution of a tool different from the one which is currently selected in the UI.
parent e02762f9
......@@ -326,6 +326,21 @@ void AlgorithmSelector::emitActionSignal()
}
void AlgorithmSelector::applyToolOn( ToolDescriptor *tool,
const QList<GenericUIData*> &items,
UIMainWindow *mainwin,
GLViewer *glviewer,
UIProject *project )
{
ToolDescriptor *selectedBackup = m_SelectedTool;
m_SelectedTool = tool;
applyCurrentToolOn(items, mainwin, glviewer, project);
m_SelectedTool = selectedBackup;
}
void AlgorithmSelector::applyCurrentToolOn( const QList<GenericUIData*> &items,
UIMainWindow *mainwin,
GLViewer *glviewer,
......@@ -359,9 +374,9 @@ void AlgorithmSelector::applyCurrentToolOn( const QList<GenericUIData*> &items,
bool executionOk;
if( m_ActionId.isNull() )
executionOk = m_SelectedTool->plugin->exec( m_SelectedTool->id, dataSet, *m_SelectedToolParam, m_ToolContext );
executionOk = m_SelectedTool->plugin->exec( m_SelectedTool->id, dataSet, *m_SelectedTool->param, m_ToolContext );
else
executionOk = m_SelectedTool->plugin->execAction( m_SelectedTool->id, m_ActionId, dataSet, *m_SelectedToolParam, m_ToolContext );
executionOk = m_SelectedTool->plugin->execAction( m_SelectedTool->id, m_ActionId, dataSet, *m_SelectedTool->param, m_ToolContext );
disconnect( m_SelectedTool->plugin, SIGNAL(notifyCreateProgressBars(int)), this, SLOT(createProgressBars(int)) );
disconnect( m_SelectedTool->plugin, SIGNAL(notifyDeleteProgressBars()), this, SLOT(deleteProgressBars()) );
......
......@@ -83,6 +83,11 @@ private slots:
public slots:
void emitApplySignal();
void emitActionSignal();
void applyToolOn( ToolDescriptor *tool,
const QList<GenericUIData*> &items,
UIMainWindow *mainwin,
GLViewer *glviewer,
UIProject *project );
void applyCurrentToolOn( const QList<GenericUIData*> &items,
UIMainWindow *mainwin,
GLViewer *glviewer,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment