mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Change running Python DPs from Edit menu
To better match the new BatchProcessing dialog - Python DPs are listed together with builtin processors to be executed like parameterless built in DPs, with option to cancel. - They also appear under the Python Fixes submenu, but in this case they also can be edited.
This commit is contained in:
@@ -597,7 +597,7 @@ MainWindow::MainWindow(const QDir &home)
|
||||
QMenu *editMenu = menuBar()->addMenu(tr("&Edit"));
|
||||
// Add all the data processors to the tools menu
|
||||
const DataProcessorFactory &factory = DataProcessorFactory::instance();
|
||||
QMap<QString, DataProcessor*> processors = factory.getProcessors(true);
|
||||
QMap<QString, DataProcessor*> processors = factory.getProcessors();
|
||||
|
||||
if (processors.count()) {
|
||||
|
||||
@@ -1255,14 +1255,9 @@ void MainWindow::manualProcess(QString name)
|
||||
name = name.remove(0, 8);
|
||||
|
||||
FixPyScript *script = fixPySettings->getScript(name);
|
||||
if (script == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
QString errText;
|
||||
FixPyRunner pyRunner(currentAthleteTab->context);
|
||||
if (pyRunner.run(script->source, script->iniKey, errText) != 0) {
|
||||
QMessageBox::critical(this, "GoldenCheetah", errText);
|
||||
if (script) {
|
||||
EditFixPyScriptDialog editDlg(currentAthleteTab->context, script, this);
|
||||
editDlg.exec();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user