Commit a5ece6f6 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.itemLibrary: avoid unnecessary signals

parent 436c02fa
...@@ -353,12 +353,17 @@ void ItemLibraryWidget::setModel(Model *model) ...@@ -353,12 +353,17 @@ void ItemLibraryWidget::setModel(Model *model)
void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag) void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
{ {
static bool block = false;
if (!m_d->model) if (!m_d->model)
return; return;
if (flag == m_filterFlag) if (flag == m_filterFlag)
return; return;
m_filterFlag = flag; if (block == true)
return;
block = true;
if (flag == QtBasic) { if (flag == QtBasic) {
removeImport(QLatin1String("com.meego")); removeImport(QLatin1String("com.meego"));
removeImport(QLatin1String("Qt.labs.Symbian")); removeImport(QLatin1String("Qt.labs.Symbian"));
...@@ -378,6 +383,8 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag) ...@@ -378,6 +383,8 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
emit meegoChecked(true); emit meegoChecked(true);
emit symbianChecked(false); emit symbianChecked(false);
} }
block = false;
m_filterFlag = flag;
} }
void ItemLibraryWidget::onQtBasicOnlyChecked(bool b) void ItemLibraryWidget::onQtBasicOnlyChecked(bool b)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment