mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-16 14:42:44 +00:00
Double-clicking a band on the Timeline will expand/collapse it (#920)
This commit is contained in:
parent
937306f4be
commit
04475a825d
@ -1049,12 +1049,7 @@ bool Timeline::onProcessMessage(Message* msg)
|
|||||||
|
|
||||||
case PART_FRAME_TAG_SWITCH_BAND_BUTTON:
|
case PART_FRAME_TAG_SWITCH_BAND_BUTTON:
|
||||||
if (m_clk.band >= 0) {
|
if (m_clk.band >= 0) {
|
||||||
if (m_tagFocusBand < 0) {
|
focusTagBand(m_clk.band);
|
||||||
m_tagFocusBand = m_clk.band;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_tagFocusBand = -1;
|
|
||||||
}
|
|
||||||
regenRows = true;
|
regenRows = true;
|
||||||
relayout = true;
|
relayout = true;
|
||||||
}
|
}
|
||||||
@ -1123,6 +1118,15 @@ bool Timeline::onProcessMessage(Message* msg)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case PART_FRAME_TAG_BAND:
|
||||||
|
if (m_hot.band >= 0) {
|
||||||
|
focusTagBand(m_hot.band);
|
||||||
|
regenerateRows();
|
||||||
|
invalidate();
|
||||||
|
layout();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3127,6 +3131,16 @@ void Timeline::showCurrentCel()
|
|||||||
showCel(layer, m_frame);
|
showCel(layer, m_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Timeline::focusTagBand(int band)
|
||||||
|
{
|
||||||
|
if (m_tagFocusBand < 0) {
|
||||||
|
m_tagFocusBand = band;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_tagFocusBand = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Timeline::cleanClk()
|
void Timeline::cleanClk()
|
||||||
{
|
{
|
||||||
invalidateHit(m_clk);
|
invalidateHit(m_clk);
|
||||||
@ -3360,7 +3374,7 @@ void Timeline::updateDropRange(const gfx::Point& pt)
|
|||||||
// Special drop target for expanded groups
|
// Special drop target for expanded groups
|
||||||
else if (m_range.type() == Range::kLayers &&
|
else if (m_range.type() == Range::kLayers &&
|
||||||
m_hot.layer >= 0 &&
|
m_hot.layer >= 0 &&
|
||||||
m_hot.layer < m_rows.size() &&
|
m_hot.layer < int(m_rows.size()) &&
|
||||||
m_rows[m_hot.layer].layer()->isGroup() &&
|
m_rows[m_hot.layer].layer()->isGroup() &&
|
||||||
static_cast<LayerGroup*>(m_rows[m_hot.layer].layer())->isExpanded()) {
|
static_cast<LayerGroup*>(m_rows[m_hot.layer].layer())->isExpanded()) {
|
||||||
m_dropTarget.vhit = DropTarget::FirstChild;
|
m_dropTarget.vhit = DropTarget::FirstChild;
|
||||||
|
@ -267,6 +267,7 @@ namespace app {
|
|||||||
void setHot(const Hit& hit);
|
void setHot(const Hit& hit);
|
||||||
void showCel(layer_t layer, frame_t frame);
|
void showCel(layer_t layer, frame_t frame);
|
||||||
void showCurrentCel();
|
void showCurrentCel();
|
||||||
|
void focusTagBand(int band);
|
||||||
void cleanClk();
|
void cleanClk();
|
||||||
gfx::Size getScrollableSize() const;
|
gfx::Size getScrollableSize() const;
|
||||||
gfx::Point getMaxScrollablePos() const;
|
gfx::Point getMaxScrollablePos() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user