diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 3b01c7943..f3d1da310 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -162,6 +162,15 @@ int CComponentsForm::getCCItemId(CComponentsItem* cc_Item) return -1; } +bool CComponentsForm::isAdded(CComponentsItem* cc_item) +{ + bool ret = false; + if (getCCItemId(cc_item) != -1) + ret = true; + return ret; +} + + CComponentsItem* CComponentsForm::getCCItem(const uint& cc_item_id) { if (v_cc_items[cc_item_id]) diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index 57e9566f8..45daa03b1 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -60,6 +60,8 @@ class CComponentsForm : public CComponentsItem virtual void paintCCItems(); virtual void clearCCItems(); virtual void cleanCCForm(); + ///property: returns true, if item already added to form + virtual bool isAdded(CComponentsItem *cc_item); }; class CComponentsIconForm : public CComponentsForm