Skip to content

Commit

Permalink
Uncheck compile flag if compiler did not produce desired result
Browse files Browse the repository at this point in the history
  • Loading branch information
joern274 committed Jul 13, 2024
1 parent 013c31d commit 573e5a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/logic_evaluator/src/logic_evaluator_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace hal {
ngates->setAlignment(Qt::AlignHCenter);
labLayout->addWidget(ngates,0,0);
mCheckCompiled = new QCheckBox("Run compiled logic", bbox);
mCheckCompiled->setChecked(!skipCompile);
mCheckCompiled->setChecked(mSharedLib.handle!=nullptr);
mCheckIndicate = new QCheckBox("Show in graphic view", bbox);
labLayout->addWidget(mCheckCompiled,2,0);
labLayout->addWidget(mCheckIndicate,3,0);
Expand All @@ -152,7 +152,11 @@ namespace hal {
void LogicEvaluatorDialog::handleCompiledStateChanged(int state)
{
if (state==Qt::Checked && !mSharedLib.handle)
{
compile();
if (!mSharedLib.handle)
mCheckCompiled->setChecked(false);
}
}

void LogicEvaluatorDialog::handleIndicateStateChanged(int state)
Expand Down Expand Up @@ -314,6 +318,8 @@ namespace hal {
return false;
}

log_info("logic_evaluator", "Temporary shared library '{}' successfully build and loaded.", mSharedLib.fnSharedLib.toStdString());

return true;
}

Expand Down
1 change: 1 addition & 0 deletions plugins/logic_evaluator/src/plugin_logic_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace hal
void LogicEvaluatorPlugin::on_load()
{
qRegisterMetaType<std::string>();
LogManager::get_instance()->add_channel("logic_evaluator", {LogManager::create_stdout_sink(), LogManager::create_file_sink(), LogManager::create_gui_sink()}, "info");
}

void LogicEvaluatorPlugin::on_unload()
Expand Down

0 comments on commit 573e5a1

Please sign in to comment.