The tool also needs updated on TimelineState Change
This commit is contained in:
parent
1bb584f895
commit
65a29244af
2 changed files with 11 additions and 5 deletions
|
|
@ -57,9 +57,12 @@ TimelineBody::TimelineBody (TimelineWidget &timelineWidget)
|
|||
timelineWidget.state_changed_signal().connect(
|
||||
sigc::mem_fun(this, &TimelineBody::on_state_changed) );
|
||||
|
||||
// Set a default Tool
|
||||
this->set_tool(Arrow);
|
||||
|
||||
// Install style properties
|
||||
register_styles();
|
||||
|
||||
|
||||
// Reset the state
|
||||
propagateStateChange();
|
||||
}
|
||||
|
|
@ -96,10 +99,10 @@ TimelineBody::get_tool() const
|
|||
}
|
||||
|
||||
void
|
||||
TimelineBody::set_tool(timeline::ToolType tool_type)
|
||||
TimelineBody::set_tool(timeline::ToolType tool_type, bool force)
|
||||
{
|
||||
// Tidy up old tool
|
||||
if(tool)
|
||||
if(tool && !force)
|
||||
{
|
||||
// Do we need to change tools?
|
||||
if(tool->get_type() == tool_type)
|
||||
|
|
@ -322,7 +325,10 @@ TimelineBody::propagateStateChange()
|
|||
viewWindow().changed_signal().connect(
|
||||
sigc::mem_fun(this, &TimelineBody::on_update_view) );
|
||||
}
|
||||
|
||||
|
||||
// Need to reload the current tool...
|
||||
set_tool (get_tool(), true);
|
||||
|
||||
// Redraw
|
||||
queue_draw();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
* @param tool_type The type of tool to set.
|
||||
*/
|
||||
void
|
||||
set_tool(ToolType tool_type);
|
||||
set_tool(ToolType tool_type, bool force=false);
|
||||
|
||||
/* ===== Events ===== */
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Reference in a new issue