mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-20 06:39:59 +01:00
BugFix: Clone source failed do not crash
Clone source that lost its origin can be replaced.
This commit is contained in:
@@ -1043,11 +1043,18 @@ void ImGuiVisitor::visit (CloneSource& s)
|
||||
}
|
||||
|
||||
// link to origin source
|
||||
std::string label = std::string(s.origin()->initials()) + " - " + s.origin()->name();
|
||||
if (ImGui::Button(label.c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0) ))
|
||||
Mixer::manager().setCurrentSource(s.origin());
|
||||
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||
ImGui::Text("Origin");
|
||||
if ( !s.failed() ) {
|
||||
std::string label = std::string(s.origin()->initials()) + " - " + s.origin()->name();
|
||||
if (ImGui::Button(label.c_str(), ImVec2(IMGUI_RIGHT_ALIGN, 0) ))
|
||||
Mixer::manager().setCurrentSource(s.origin());
|
||||
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||
ImGui::Text("Origin");
|
||||
}
|
||||
else {
|
||||
ImGuiToolkit::ButtonDisabled("No source", ImVec2(IMGUI_RIGHT_ALIGN, 0) );
|
||||
ImGui::SameLine(0, IMGUI_SAME_LINE);
|
||||
ImGui::Text("Origin");
|
||||
}
|
||||
|
||||
// filter selection
|
||||
std::ostringstream oss;
|
||||
|
||||
Reference in New Issue
Block a user