Stop Double Click Key to Open Function Editor (#411)
This commit is contained in:
parent
e8d1f92535
commit
a65e4e9504
1 changed files with 15 additions and 7 deletions
|
@ -3039,15 +3039,21 @@ void CellArea::mouseDoubleClickEvent(QMouseEvent *event) {
|
|||
int k0, k1;
|
||||
bool isKeyframeFrame = pegbar && pegbar->getKeyframeRange(k0, k1) &&
|
||||
k0 <= row && row <= k1 + 1;
|
||||
|
||||
// If you are in the keyframe area, open a function editor
|
||||
if (isKeyframeFrame && isKeyFrameArea(col, row, mouseInCell)) {
|
||||
QAction *action =
|
||||
CommandManager::instance()->getAction(MI_OpenFunctionEditor);
|
||||
action->trigger();
|
||||
if (isKeyframeFrame &&
|
||||
isKeyFrameArea(col, row,
|
||||
mouseInCell)) { // They are in the keyframe selection
|
||||
if (pegbar->isKeyframe(row)) // in the keyframe
|
||||
{
|
||||
m_viewer->setCurrentRow(
|
||||
row); // If you click on the key, change the current row as well
|
||||
setDragTool(XsheetGUI::DragTool::makeKeyframeMoverTool(m_viewer));
|
||||
m_viewer->dragToolClick(event);
|
||||
event->accept();
|
||||
update();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (col == -1) return;
|
||||
|
||||
|
@ -3588,6 +3594,8 @@ void CellArea::createKeyLineMenu(QMenu &menu, int row, int col) {
|
|||
}
|
||||
connect(actionGroup, SIGNAL(triggered(QAction *)), this,
|
||||
SLOT(onStepChanged(QAction *)));
|
||||
menu.addSeparator();
|
||||
menu.addAction(cmdManager->getAction(MI_OpenFunctionEditor));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue