mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Added opposite action of 'Group all sources'
Mixer action ungroupAll expands all SessionGroupSources.
This commit is contained in:
14
Mixer.cpp
14
Mixer.cpp
@@ -794,7 +794,19 @@ void Mixer::groupAll()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mixer::flattenSession()
|
void Mixer::ungroupAll()
|
||||||
|
{
|
||||||
|
for (auto source_iter = session_->begin(); source_iter != session_->end(); source_iter++)
|
||||||
|
{
|
||||||
|
SessionGroupSource *ss = dynamic_cast< SessionGroupSource * >(*source_iter);
|
||||||
|
|
||||||
|
if ( ss != nullptr )
|
||||||
|
import(ss);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mixer::groupSession()
|
||||||
{
|
{
|
||||||
// new session group containing current session
|
// new session group containing current session
|
||||||
SessionGroupSource *sessiongroup = new SessionGroupSource;
|
SessionGroupSource *sessiongroup = new SessionGroupSource;
|
||||||
|
|||||||
4
Mixer.h
4
Mixer.h
@@ -68,8 +68,8 @@ public:
|
|||||||
void deleteSelection ();
|
void deleteSelection ();
|
||||||
void groupSelection ();
|
void groupSelection ();
|
||||||
void groupAll ();
|
void groupAll ();
|
||||||
|
void ungroupAll ();
|
||||||
void flattenSession();
|
void groupSession ();
|
||||||
|
|
||||||
// current source
|
// current source
|
||||||
Source *currentSource ();
|
Source *currentSource ();
|
||||||
|
|||||||
@@ -989,7 +989,10 @@ void UserInterface::showMenuFile()
|
|||||||
// switch pannel to show first source (created)
|
// switch pannel to show first source (created)
|
||||||
navigator.showPannelSource(0);
|
navigator.showPannelSource(0);
|
||||||
}
|
}
|
||||||
// TODO : FLATTEN (import all sources from all groups)
|
if (ImGuiToolkit::MenuItemIcon(7, 2, "Expand all groups", false, Mixer::manager().numSource() > 0)) {
|
||||||
|
// create a new group session with all sources
|
||||||
|
Mixer::manager().ungroupAll();
|
||||||
|
}
|
||||||
|
|
||||||
// HELP AND QUIT
|
// HELP AND QUIT
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|||||||
Reference in New Issue
Block a user