Remove selection requirement to toggle Camera Column
This commit is contained in:
parent
83fe31d0e0
commit
31e2aba9e1
4 changed files with 24 additions and 16 deletions
|
@ -49,11 +49,6 @@ void TColumnSelection::enableCommands() {
|
||||||
enableCommand(this, MI_Resequence, &TColumnSelection::resequence);
|
enableCommand(this, MI_Resequence, &TColumnSelection::resequence);
|
||||||
enableCommand(this, MI_CloneChild, &TColumnSelection::cloneChild);
|
enableCommand(this, MI_CloneChild, &TColumnSelection::cloneChild);
|
||||||
enableCommand(this, MI_FoldColumns, &TColumnSelection::hideColumns);
|
enableCommand(this, MI_FoldColumns, &TColumnSelection::hideColumns);
|
||||||
|
|
||||||
if (Preferences::instance()->isShowKeyframesOnXsheetCellAreaEnabled())
|
|
||||||
enableCommand(this, MI_ToggleXsheetCameraColumn,
|
|
||||||
&TColumnSelection::toggleCameraColumn);
|
|
||||||
|
|
||||||
enableCommand(this, MI_Reframe1, &TColumnSelection::reframe1Cells);
|
enableCommand(this, MI_Reframe1, &TColumnSelection::reframe1Cells);
|
||||||
enableCommand(this, MI_Reframe2, &TColumnSelection::reframe2Cells);
|
enableCommand(this, MI_Reframe2, &TColumnSelection::reframe2Cells);
|
||||||
enableCommand(this, MI_Reframe3, &TColumnSelection::reframe3Cells);
|
enableCommand(this, MI_Reframe3, &TColumnSelection::reframe3Cells);
|
||||||
|
@ -270,11 +265,3 @@ void TColumnSelection::hideColumns() {
|
||||||
// TApp::instance()->->notify(TColumnHeadChange());
|
// TApp::instance()->->notify(TColumnHeadChange());
|
||||||
app->getCurrentScene()->setDirtyFlag(true);
|
app->getCurrentScene()->setDirtyFlag(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void TColumnSelection::toggleCameraColumn() {
|
|
||||||
Preferences *pref = Preferences::instance();
|
|
||||||
pref->enableXsheetCameraColumn(!pref->isXsheetCameraColumnVisible());
|
|
||||||
TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
|
|
||||||
}
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ public:
|
||||||
void cloneChild();
|
void cloneChild();
|
||||||
|
|
||||||
void hideColumns();
|
void hideColumns();
|
||||||
void toggleCameraColumn();
|
|
||||||
|
|
||||||
void reframeCells(int count);
|
void reframeCells(int count);
|
||||||
void reframe1Cells() { reframeCells(1); }
|
void reframe1Cells() { reframeCells(1); }
|
||||||
|
|
|
@ -1758,8 +1758,8 @@ void MainWindow::defineActions() {
|
||||||
"Alt+L");
|
"Alt+L");
|
||||||
createRightClickMenuAction(MI_ToggleXSheetToolbar,
|
createRightClickMenuAction(MI_ToggleXSheetToolbar,
|
||||||
tr("Toggle XSheet Toolbar"), "");
|
tr("Toggle XSheet Toolbar"), "");
|
||||||
createRightClickMenuAction(MI_ToggleXsheetCameraColumn,
|
createMenuXsheetAction(MI_ToggleXsheetCameraColumn,
|
||||||
tr("Show/Hide Xsheet Camera Column"), "");
|
tr("Show/Hide Xsheet Camera Column"), "");
|
||||||
createMenuCellsAction(MI_Reverse, tr("&Reverse"), "");
|
createMenuCellsAction(MI_Reverse, tr("&Reverse"), "");
|
||||||
createMenuCellsAction(MI_Swing, tr("&Swing"), "");
|
createMenuCellsAction(MI_Swing, tr("&Swing"), "");
|
||||||
createMenuCellsAction(MI_Random, tr("&Random"), "");
|
createMenuCellsAction(MI_Random, tr("&Random"), "");
|
||||||
|
|
|
@ -2131,3 +2131,25 @@ void PrintXsheetCommand::execute() {
|
||||||
|
|
||||||
TSystem::showDocument(fp);
|
TSystem::showDocument(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class ToggleXsheetCameraColumnCommand final : public MenuItemHandler {
|
||||||
|
public:
|
||||||
|
ToggleXsheetCameraColumnCommand()
|
||||||
|
: MenuItemHandler(MI_ToggleXsheetCameraColumn) {}
|
||||||
|
|
||||||
|
void execute() override {
|
||||||
|
Preferences *pref = Preferences::instance();
|
||||||
|
if (!pref->isShowKeyframesOnXsheetCellAreaEnabled()) {
|
||||||
|
DVGui::warning(
|
||||||
|
QObject::tr("Please enable \"Show Keyframes on Cell Area\" to show "
|
||||||
|
"or hide the camera column."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pref->enableXsheetCameraColumn(!pref->isXsheetCameraColumnVisible());
|
||||||
|
TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
} ToggleXsheetCameraColumnCommand;
|
||||||
|
|
Loading…
Reference in a new issue