delete pictures from the widget by selecting and pressing delete.

Dirk Hohndel dirk at hohndel.org
Wed Aug 6 16:09:00 PDT 2014


On Wed, Aug 06, 2014 at 06:09:07PM -0300, Tomaz Canabrava wrote:
> this was needed to remove the pictures that are not on the trip.

> --- a/qt-ui/modeldelegates.cpp
> +++ b/qt-ui/modeldelegates.cpp
> @@ -63,8 +63,9 @@ QSize StarWidgetsDelegate::sizeHint(const QStyleOptionViewItem &option, const QM
>  	return QSize(IMG_SIZE * TOTALSTARS + SPACING * (TOTALSTARS - 1), IMG_SIZE);
>  }
>  
> -ComboBoxDelegate::ComboBoxDelegate(QAbstractItemModel *model, QObject *parent) : QStyledItemDelegate(parent), model(model)
> +ComboBoxDelegate::ComboBoxDelegate(QAbstractItemModel *model, QObject *parent) : QStyledItemDelegate(parent)
>  {
> +	model = new QSortFilterProxyModel();
>  	connect(this, SIGNAL(closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint)),
>  		this, SLOT(revertModelData(QWidget *, QAbstractItemDelegate::EndEditHint)));
>  	connect(this, SIGNAL(closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint)),

Are you sure about this change? I don't see it's connection to the
pictures... I worry that this is from you playing with sorting the
locations drop-down...

/D


More information about the subsurface mailing list