The elements panel now applies again the filter when the panel content is changed.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1496 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-02-12 15:33:04 +00:00
parent bde78d0412
commit 39c75e0136
2 changed files with 47 additions and 11 deletions

View File

@@ -78,6 +78,8 @@ class ElementsPanel : public GenericPanel {
void projectWasOpened(QETProject *);
void projectWasClosed(QETProject *);
bool scrollToElement(const ElementsLocation &);
void applyCurrentFilter(const QList<QTreeWidgetItem *> &);
void ensureHierarchyIsVisible(const QList<QTreeWidgetItem *> &);
protected:
void dragEnterEvent(QDragEnterEvent *);
@@ -86,9 +88,11 @@ class ElementsPanel : public GenericPanel {
void startDrag(Qt::DropActions);
void startElementDrag(const ElementsLocation &);
void startTitleBlockTemplateDrag(const TitleBlockTemplateLocation &);
bool matchesCurrentFilter(const QTreeWidgetItem *) const;
protected slots:
void firstActivation();
void panelContentChange();
private:
QTreeWidgetItem *addProject (QETProject *);
@@ -97,8 +101,6 @@ class ElementsPanel : public GenericPanel {
QTreeWidgetItem *updateElementsCategoryItem(QTreeWidgetItem *, ElementsCategory *, PanelOptions, bool = false);
QTreeWidgetItem *updateElementItem (QTreeWidgetItem *, ElementDefinition *, PanelOptions, bool = false);
void ensureHierarchyIsVisible(QList<QTreeWidgetItem *>);
// attributes
private:
QSet<QETProject *> projects_to_display_; ///< list of projects that have been added to this panel
@@ -108,5 +110,6 @@ class ElementsPanel : public GenericPanel {
QTreeWidgetItem *custom_tbt_collection_item_; ///< pointer to the item representing the user templates collection
int loading_progress_; ///< used to track the loading progress of elements collections
bool first_reload_; ///< used to distinguish the first time this panel is reloaded
QString filter_; ///< Currently applied filter
};
#endif