mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-16 04:40:08 +01:00
Move Group/Ungroup actions to Edit menu
This commit is contained in:
@@ -916,6 +916,14 @@ void UserInterface::showMenuEdit()
|
|||||||
const char *clipboard = ImGui::GetClipboardText();
|
const char *clipboard = ImGui::GetClipboardText();
|
||||||
bool has_clipboard = (clipboard != nullptr && strlen(clipboard) > 0 && SessionLoader::isClipboard(clipboard));
|
bool has_clipboard = (clipboard != nullptr && strlen(clipboard) > 0 && SessionLoader::isClipboard(clipboard));
|
||||||
|
|
||||||
|
// UNDO
|
||||||
|
if ( ImGui::MenuItem( MENU_UNDO, SHORTCUT_UNDO) )
|
||||||
|
Action::manager().undo();
|
||||||
|
if ( ImGui::MenuItem( MENU_REDO, SHORTCUT_REDO) )
|
||||||
|
Action::manager().redo();
|
||||||
|
|
||||||
|
// EDIT
|
||||||
|
ImGui::Separator();
|
||||||
if (ImGui::MenuItem( MENU_CUT, SHORTCUT_CUT, false, has_selection)) {
|
if (ImGui::MenuItem( MENU_CUT, SHORTCUT_CUT, false, has_selection)) {
|
||||||
std::string copied_text = Mixer::selection().clipboard();
|
std::string copied_text = Mixer::selection().clipboard();
|
||||||
if (!copied_text.empty()) {
|
if (!copied_text.empty()) {
|
||||||
@@ -938,11 +946,19 @@ void UserInterface::showMenuEdit()
|
|||||||
Mixer::manager().view()->selectAll();
|
Mixer::manager().view()->selectAll();
|
||||||
navigator.hidePannel();
|
navigator.hidePannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GROUP
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if ( ImGui::MenuItem( MENU_UNDO, SHORTCUT_UNDO) )
|
if (ImGuiToolkit::MenuItemIcon(11, 2, " Group active sources", false, Mixer::manager().numSource() > 0)) {
|
||||||
Action::manager().undo();
|
// create a new group session with only active sources
|
||||||
if ( ImGui::MenuItem( MENU_REDO, SHORTCUT_REDO) )
|
Mixer::manager().groupAll( true );
|
||||||
Action::manager().redo();
|
// switch pannel to show first source (created)
|
||||||
|
navigator.showPannelSource(0);
|
||||||
|
}
|
||||||
|
if (ImGuiToolkit::MenuItemIcon(7, 2, " Expand groups", false, Mixer::manager().numSource() > 0)) {
|
||||||
|
// create a new group session with all sources
|
||||||
|
Mixer::manager().ungroupAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserInterface::showMenuFile()
|
void UserInterface::showMenuFile()
|
||||||
@@ -985,19 +1001,6 @@ void UserInterface::showMenuFile()
|
|||||||
|
|
||||||
ImGui::MenuItem( MENU_SAVE_ON_EXIT, nullptr, &Settings::application.recentSessions.save_on_exit);
|
ImGui::MenuItem( MENU_SAVE_ON_EXIT, nullptr, &Settings::application.recentSessions.save_on_exit);
|
||||||
|
|
||||||
// GROUP
|
|
||||||
ImGui::Separator();
|
|
||||||
if (ImGuiToolkit::MenuItemIcon(11, 2, " Group active sources", false, Mixer::manager().numSource() > 0)) {
|
|
||||||
// create a new group session with only active sources
|
|
||||||
Mixer::manager().groupAll( true );
|
|
||||||
// switch pannel to show first source (created)
|
|
||||||
navigator.showPannelSource(0);
|
|
||||||
}
|
|
||||||
if (ImGuiToolkit::MenuItemIcon(7, 2, " Expand 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();
|
||||||
if (ImGui::MenuItem( IMGUI_TITLE_HELP, SHORTCUT_HELP))
|
if (ImGui::MenuItem( IMGUI_TITLE_HELP, SHORTCUT_HELP))
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#define IMGUI_TITLE_MEDIAPLAYER ICON_FA_PLAY_CIRCLE " Player"
|
#define IMGUI_TITLE_MEDIAPLAYER ICON_FA_PLAY_CIRCLE " Player"
|
||||||
#define IMGUI_TITLE_TIMER ICON_FA_CLOCK " Timer"
|
#define IMGUI_TITLE_TIMER ICON_FA_CLOCK " Timer"
|
||||||
#define IMGUI_TITLE_INPUT_MAPPING ICON_FA_HAND_PAPER " Inputs Mapping"
|
#define IMGUI_TITLE_INPUT_MAPPING ICON_FA_HAND_PAPER " Input Mapping"
|
||||||
#define IMGUI_TITLE_HELP ICON_FA_LIFE_RING " Help"
|
#define IMGUI_TITLE_HELP ICON_FA_LIFE_RING " Help"
|
||||||
#define IMGUI_TITLE_TOOLBOX ICON_FA_HAMSA " Guru Toolbox"
|
#define IMGUI_TITLE_TOOLBOX ICON_FA_HAMSA " Guru Toolbox"
|
||||||
#define IMGUI_TITLE_SHADEREDITOR ICON_FA_CODE " Shader Editor"
|
#define IMGUI_TITLE_SHADEREDITOR ICON_FA_CODE " Shader Editor"
|
||||||
|
|||||||
Reference in New Issue
Block a user