diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/cylindermodel.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index 8786f7889..8c9bee8b1 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -112,11 +112,17 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const break; case Qt::DecorationRole: if (index.column() == REMOVE) - ret = trashIcon(); + if (rowCount() > 1) + ret = trashIcon(); + else + ret = trashForbiddenIcon(); break; case Qt::SizeHintRole: if (index.column() == REMOVE) - ret = trashIcon().size(); + if (rowCount() > 1) + ret = trashIcon(); + else + ret = trashForbiddenIcon(); break; case Qt::ToolTipRole: |