diff --git a/src/app/ui/timeline.cpp b/src/app/ui/timeline.cpp index 580838d70..a59b09f2b 100644 --- a/src/app/ui/timeline.cpp +++ b/src/app/ui/timeline.cpp @@ -589,29 +589,18 @@ bool Timeline::onProcessMessage(Message* msg) #if 0 // Show the frame's properties dialog. else if (mouseMsg->left()) { - if (m_clk_frame == m_hot_frame) { - // Execute FrameProperties command for current frame. - Command* command = CommandsModule::instance() - ->getCommandByName(CommandId::FrameProperties); - Params params; - params.set("frame", "current"); + const ContextReader reader(m_context); - UIContext::instance()->executeCommand(command, ¶ms); - } - else { - const ContextReader reader(m_context); - - if (m_hot_frame >= 0 && - m_hot_frame < m_sprite->getTotalFrames() && - m_hot_frame != m_clk_frame+1) { - { - ContextWriter writer(reader); - UndoTransaction undoTransaction(m_context, "Move Frame"); - m_document->getApi().moveFrameBefore(writer.sprite(), m_clk_frame, m_hot_frame); - undoTransaction.commit(); - } - invalidate(); + if (m_hot_frame >= 0 && + m_hot_frame < m_sprite->getTotalFrames() && + m_hot_frame != m_clk_frame+1) { + { + ContextWriter writer(reader); + UndoTransaction undoTransaction(m_context, "Move Frame"); + m_document->getApi().moveFrameBefore(writer.sprite(), m_clk_frame, m_hot_frame); + undoTransaction.commit(); } + invalidate(); } } #endif @@ -763,6 +752,38 @@ bool Timeline::onProcessMessage(Message* msg) } break; + case kDoubleClickMessage: + switch (m_hot_part) { + + case A_PART_LAYER_TEXT: { + Command* command = CommandsModule::instance() + ->getCommandByName(CommandId::LayerProperties); + + UIContext::instance()->executeCommand(command); + break; + } + + case A_PART_HEADER_FRAME: { + Command* command = CommandsModule::instance() + ->getCommandByName(CommandId::FrameProperties); + Params params; + params.set("frame", "current"); + + UIContext::instance()->executeCommand(command, ¶ms); + break; + } + + case A_PART_CEL: { + Command* command = CommandsModule::instance() + ->getCommandByName(CommandId::CelProperties); + + UIContext::instance()->executeCommand(command); + break; + } + + } + break; + case kKeyUpMessage: switch (static_cast(msg)->scancode()) {