Commit a599650f authored by Leander Schulten's avatar Leander Schulten
Browse files

fix minor bugs

parent c4d62a22
......@@ -238,9 +238,11 @@ public:
void setRun( const bool _run){
if(_run != run){
run = _run;
if(run)
Modules::ModuleManager::singletone()->controller().runProgramm(*std::find_if(Modules::ProgramBlockManager::model.cbegin(),Modules::ProgramBlockManager::model.cend(),[&](const auto &v){return v.get()==programBlock;}));
else
if(run){
auto iter = std::find_if(Modules::ProgramBlockManager::model.cbegin(),Modules::ProgramBlockManager::model.cend(),[&](const auto &v){return v.get()==programBlock;});
if(iter != Modules::ProgramBlockManager::model.cend())
Modules::ModuleManager::singletone()->controller().runProgramm(*iter);
}else
Modules::ModuleManager::singletone()->controller().stopProgramm(programBlock);
emit runChanged();
}
......
......@@ -256,13 +256,13 @@ namespace Modules {
// verschiedene Ebenen von Filtern
const std::multimap<int,detail::Connection> & getFilter()const{return filter;}
// a list of all consumer and their connections
const std::vector<detail::Connection> getConsumer()const{return consumer;}
const std::vector<detail::Connection> & getConsumer()const{return consumer;}
std::set<std::shared_ptr<Program>> & getPrograms(){return programs;}
// verschiedene Ebenen von Filtern
std::multimap<int,detail::Connection> & getFilter(){return filter;}
// a list of all consumer and their connections
std::vector<detail::Connection> getConsumer(){return consumer;}
std::vector<detail::Connection> & getConsumer(){return consumer;}
public:
ProgramBlock(QString name = "No name"):name(name){}
......
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