Temporary disabling feature 'follow image processing'

This commit is contained in:
brunoherbelin
2021-04-07 23:00:09 +02:00
parent b3880ad380
commit 5a9d4dd55e
5 changed files with 31 additions and 22 deletions

View File

@@ -500,24 +500,24 @@ void ImGuiVisitor::visit (Source& s)
oss << s.name() << ": " << "Change Filter";
Action::manager().store(oss.str());
}
ImGui::Separator();
if (ImGui::BeginMenu("Follow"))
{
for (auto mpit = Mixer::manager().session()->begin();
mpit != Mixer::manager().session()->end(); mpit++ )
{
std::string label = (*mpit)->name();
if ( (*mpit)->id() != s.id() &&
(*mpit)->imageProcessingEnabled() &&
!(*mpit)->processingshader_link_.connected()) {
if (ImGui::MenuItem( label.c_str() )){
s.processingshader_link_.connect(*mpit);
s.touch();
}
}
}
ImGui::EndMenu();
}
// ImGui::Separator();
// if (ImGui::BeginMenu("Follow"))
// {
// for (auto mpit = Mixer::manager().session()->begin();
// mpit != Mixer::manager().session()->end(); mpit++ )
// {
// std::string label = (*mpit)->name();
// if ( (*mpit)->id() != s.id() &&
// (*mpit)->imageProcessingEnabled() &&
// !(*mpit)->processingshader_link_.connected()) {
// if (ImGui::MenuItem( label.c_str() )){
// s.processingshader_link_.connect(*mpit);
// s.touch();
// }
// }
// }
// ImGui::EndMenu();
// }
}
ImGui::EndPopup();
@@ -532,7 +532,7 @@ void ImGuiVisitor::visit (Source& s)
ImGui::Text("Filters");
Source *target = s.processingshader_link_.source();
ImGui::Text("Following");
if ( ImGui::Button(target->name().c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
if ( target != nullptr && ImGui::Button(target->name().c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0)) )
Mixer::manager().setCurrentSource(target);
}
else