@@ -19,6 +19,7 public: | |||
|
19 | 19 | |
|
20 | 20 | /// Returns the catalogue represented by the item |
|
21 | 21 | std::shared_ptr<DBCatalogue> catalogue() const; |
|
22 | void replaceCatalogue(const std::shared_ptr<DBCatalogue> &catalogue); | |
|
22 | 23 | |
|
23 | 24 | private: |
|
24 | 25 | class CatalogueTreeItemPrivate; |
@@ -133,6 +133,7 CatalogueSideBarWidget::CatalogueSideBarWidget(QWidget *parent) | |||
|
133 | 133 | connect(impl->m_TreeModel, &CatalogueTreeModel::itemDropped, |
|
134 | 134 | [this](auto index, auto mimeData, auto action) { |
|
135 | 135 | auto item = impl->m_TreeModel->item(index); |
|
136 | ||
|
136 | 137 | if (item && item->type() == CATALOGUE_ITEM_TYPE) { |
|
137 | 138 | auto catalogue = static_cast<CatalogueTreeItem *>(item)->catalogue(); |
|
138 | 139 | this->setCatalogueChanges(catalogue, true); |
@@ -144,9 +145,12 CatalogueSideBarWidget::CatalogueSideBarWidget(QWidget *parent) | |||
|
144 | 145 | mimeData->data(MIME_TYPE_SOURCE_CATALOGUE_LIST)); |
|
145 | 146 | for (auto catalogue : sourceCatalogues) { |
|
146 | 147 | if (auto catalogueItem = impl->getCatalogueItem(catalogue)) { |
|
148 | catalogueItem->replaceCatalogue(catalogue); | |
|
147 | 149 | this->setCatalogueChanges(catalogue, true); |
|
148 | 150 | } |
|
149 | 151 | } |
|
152 | ||
|
153 | this->emitSelection(); | |
|
150 | 154 | } |
|
151 | 155 | }); |
|
152 | 156 |
General Comments 0
You need to be logged in to leave comments.
Login now