On Thu, Dec 18, 2014 at 1:14 PM, Miika Turkia <[email protected]>
wrote:
>
> This makes the new filtering unusable so nack from me.
>
> miika
>
>
> On Thu, Dec 18, 2014 at 9:47 AM, Anton Lundin <[email protected]> wrote:
>>
>> Signed-off-by: Anton Lundin <[email protected]>
>> ---
>>  qt-ui/simplewidgets.cpp | 6 +-----
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
>> index 0ec03b4..b004664 100644
>> --- a/qt-ui/simplewidgets.cpp
>> +++ b/qt-ui/simplewidgets.cpp
>> @@ -616,10 +616,6 @@ MultiFilter::MultiFilter(QWidget *parent) :
>> QWidget(parent)
>>         int minimumHeight = tagFilter->ui.filterInternalList->height() +
>>                         tagFilter->ui.verticalLayout->spacing() *
>> tagFilter->ui.verticalLayout->count();
>>
>> -       QListView *dummyList = new QListView();
>> -       QStringListModel *dummy = new QStringListModel(QStringList() <<
>> "Dummy Text");
>> -       dummyList->setModel(dummy);
>> -
>>         connect(ui->close, SIGNAL(clicked(bool)), this,
>> SLOT(closeFilter()));
>>         connect(ui->clear, SIGNAL(clicked(bool)),
>> MultiFilterSortModel::instance(), SLOT(clearFilter()));
>>         connect(ui->maximize, SIGNAL(clicked(bool)), this,
>> SLOT(adjustHeight()));
>> @@ -633,7 +629,7 @@ MultiFilter::MultiFilter(QWidget *parent) :
>> QWidget(parent)
>>         expandedWidget->setLayout(l);
>>
>>         ui->scrollArea->setWidget(expandedWidget);
>> -       expandedWidget->resize(expandedWidget->width(), minimumHeight +
>> dummyList->sizeHintForRow(0) * 5 );
>> +       expandedWidget->resize(expandedWidget->width(), minimumHeight );
>>         ui->scrollArea->setMinimumHeight(expandedWidget->height() + 5);
>>
>
Heh, I thinik it's a bad idea, since these dummys are to calculate a sane
width for the dialog.
this part, specially : + dummyList->sizeHintForRow(0) * 5 ), wich means
"please, give me space for 5 rows of choices" :)
We can't use that without use a dummyModel because we need to have a row to
ask for it's size.


>>         connect(MultiFilterSortModel::instance(),
>> SIGNAL(filterFinished()), this, SLOT(filterFinished()));
>> --
>> 2.1.0
>>
>> _______________________________________________
>> subsurface mailing list
>> [email protected]
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>
>
> _______________________________________________
> subsurface mailing list
> [email protected]
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to