Change group resize so that resizing a clip in a group will now resize all its elements

Shift+resize allows resizing only one clip in a group.
Fixes #182
parent d46862c9
...@@ -2014,14 +2014,14 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU ...@@ -2014,14 +2014,14 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
Fun undo = []() { return true; }; Fun undo = []() { return true; };
Fun redo = []() { return true; }; Fun redo = []() { return true; };
std::unordered_set<int> all_items; std::unordered_set<int> all_items;
all_items.insert(itemId);
if (!allowSingleResize && m_groups->isInGroup(itemId)) { if (!allowSingleResize && m_groups->isInGroup(itemId)) {
int groupId = m_groups->getRootId(itemId); int groupId = m_groups->getRootId(itemId);
std::unordered_set<int> items; std::unordered_set<int> items = m_groups->getLeaves(groupId);
if (m_groups->getType(groupId) == GroupType::AVSplit) { /*if (m_groups->getType(groupId) == GroupType::AVSplit) {
// Only resize group elements if it is an avsplit // Only resize group elements if it is an avsplit
items = m_groups->getLeaves(groupId); items = m_groups->getLeaves(groupId);
} }*/
all_items.insert(itemId);
for (int id : items) { for (int id : items) {
if (id == itemId) { if (id == itemId) {
continue; continue;
...@@ -2036,8 +2036,6 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU ...@@ -2036,8 +2036,6 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
all_items.insert(id); all_items.insert(id);
} }
} }
} else {
all_items.insert(itemId);
} }
bool result = true; bool result = true;
int finalPos = right ? in + size : out - size; int finalPos = right ? in + size : out - size;
......
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