Commit 78ac56d6 authored by Victor Yacovlev's avatar Victor Yacovlev

FS#1254

parent 8b7d2ba4
......@@ -31,7 +31,7 @@ KumirProgram::KumirProgram(QObject *parent)
, w_debuggerWindow(0)
{
b_blind = false;
courseManagerRequest_ = false;
a_regularRun = new QAction(tr("Regular run"), this);
a_regularRun->setIcon(QIcon::fromTheme("media-playback-start", QIcon(QApplication::instance()->property("sharePath").toString()+"/icons/media-playback-start.png")));
connect(a_regularRun, SIGNAL(triggered()), this, SLOT(regularRun()));
......@@ -477,7 +477,7 @@ void KumirProgram::handleRunnerStopped(int rr)
typedef Shared::RunInterface RI;
RI * runner =
ExtensionSystem::PluginManager::instance()->findPlugin<RI>();
if (courseManager && previousState == TestingRun) {
if (courseManager && previousState == TestingRun && courseManagerRequest_) {
if (reason == Shared::RunInterface::SR_UserTerminated) {
courseManager->setTestingResult(CI::UserTerminated, 0);
}
......
......@@ -39,6 +39,7 @@ public:
void setBytecodeRun(KPlugin * run);
inline QString endStatus() const { return s_endStatus; }
inline void setCourseManagerRequest() { courseManagerRequest_ = true; }
~KumirProgram();
signals:
void giveMeAProgram();
......@@ -84,6 +85,8 @@ private:
QActionGroup * gr_actions;
QString s_sourceFileName;
bool courseManagerRequest_;
int documentId_;
bool b_blind;
int i_timerId;
......
......@@ -511,6 +511,7 @@ GuiInterface::ProgramSourceText Plugin::programSource() const
void Plugin::startTesting()
{
kumirProgram_->setCourseManagerRequest();
kumirProgram_->testingRun();
}
......
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