diff options
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 90a527e3a..e5c2830fc 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -1083,14 +1083,16 @@ void MainTab::on_visibility_valueChanged(int value) void MainTab::editCylinderWidget(const QModelIndex &index) { + // we need a local copy or bad things happen when enableEdition() is called + QModelIndex editIndex = index; if (cylindersModel->changed && editMode == NONE) { enableEdition(); return; } - if (index.isValid() && index.column() != CylindersModel::REMOVE) { + if (editIndex.isValid() && editIndex.column() != CylindersModel::REMOVE) { if (editMode == NONE) enableEdition(); - ui.cylinders->edit(index); + ui.cylinders->edit(editIndex); } } |