Merge pull request #757 from manongjohn/fix_crash_adding_fx_while_on_camera_col
Fix crash adding Fx while on Camera column
This commit is contained in:
commit
08829c4a2a
2 changed files with 5 additions and 3 deletions
|
@ -936,6 +936,8 @@ void TFxCommand::addFx(TFx *newFx, const QList<TFxP> &fxs, TApplication *app,
|
|||
int col, int row) {
|
||||
if (!newFx) return;
|
||||
|
||||
if (col < 0) col = 0;
|
||||
|
||||
std::unique_ptr<FxCommandUndo> undo(
|
||||
new InsertFxUndo(newFx, row, col, fxs, QList<Link>(), app, false));
|
||||
if (!undo->isConsistent()) return;
|
||||
|
|
|
@ -565,9 +565,9 @@ void AddFxContextMenu::onAddFx(QAction *action) {
|
|||
if (fx->isZerary() &&
|
||||
fx->getAttributes()->getDagNodePos() != TConst::nowhere) {
|
||||
TXsheet *xsh = m_app->getCurrentXsheet()->getXsheet();
|
||||
TXshZeraryFxColumn *column =
|
||||
xsh->getColumn(m_app->getCurrentColumn()->getColumnIndex())
|
||||
->getZeraryFxColumn();
|
||||
int col = m_app->getCurrentColumn()->getColumnIndex();
|
||||
if (col < 0) col = 0;
|
||||
TXshZeraryFxColumn *column = xsh->getColumn(col)->getZeraryFxColumn();
|
||||
if (column)
|
||||
column->getZeraryColumnFx()->getAttributes()->setDagNodePos(
|
||||
fx->getAttributes()->getDagNodePos());
|
||||
|
|
Loading…
Reference in a new issue