##// END OF EJS Templates
Some fixes
trabillard -
r1290:21b6c58e9bf1
parent child
Show More
@@ -13,6 +13,7
13 13 #include <Catalogue/CatalogueSideBarWidget.h>
14 14 #include <Catalogue/CreateEventDialog.h>
15 15
16 #include <CatalogueDao.h>
16 17 #include <DBCatalogue.h>
17 18 #include <DBEvent.h>
18 19 #include <DBEventProduct.h>
@@ -106,7 +107,7 void CatalogueActionManager::installSelectionZoneActions()
106 107 auto createEventAction = actionController.addSectionZoneAction(
107 108 {QObject::tr("Catalogues")}, QObject::tr("New Event..."), [this](auto zones) {
108 109 CreateEventDialog dialog(
109 impl->m_CatalogueExplorer->sideBarWidget().getCatalogues("Default"));
110 impl->m_CatalogueExplorer->sideBarWidget().getCatalogues(REPOSITORY_DEFAULT));
110 111 dialog.hideCatalogueChoice();
111 112 if (dialog.exec() == QDialog::Accepted) {
112 113 impl->createEventFromZones(dialog.eventName(), zones);
@@ -117,7 +118,7 void CatalogueActionManager::installSelectionZoneActions()
117 118 auto createEventInCatalogueAction = actionController.addSectionZoneAction(
118 119 {QObject::tr("Catalogues")}, QObject::tr("New Event in Catalogue..."), [this](auto zones) {
119 120 CreateEventDialog dialog(
120 impl->m_CatalogueExplorer->sideBarWidget().getCatalogues("Default"));
121 impl->m_CatalogueExplorer->sideBarWidget().getCatalogues(REPOSITORY_DEFAULT));
121 122 if (dialog.exec() == QDialog::Accepted) {
122 123 auto selectedCatalogue = dialog.selectedCatalogue();
123 124 if (!selectedCatalogue) {
@@ -125,7 +126,7 void CatalogueActionManager::installSelectionZoneActions()
125 126 selectedCatalogue->setName(dialog.catalogueName());
126 127 // sqpApp->catalogueController().addCatalogue(selectedCatalogue); TODO
127 128 impl->m_CatalogueExplorer->sideBarWidget().addCatalogue(selectedCatalogue,
128 "Default");
129 REPOSITORY_DEFAULT);
129 130 }
130 131
131 132 impl->createEventFromZones(dialog.eventName(), zones, selectedCatalogue);
@@ -320,6 +320,7 void CatalogueEventsWidget::setEventChanges(const std::shared_ptr<DBEvent> &even
320 320 auto validationIndex
321 321 = eventIndex.sibling(eventIndex.row(), (int)CatalogueEventsModel::Column::Validation);
322 322
323 if (validationIndex.isValid()) {
323 324 if (hasChanges) {
324 325 if (ui->treeView->indexWidget(validationIndex) == nullptr) {
325 326 auto widget = CatalogueExplorerHelper::buildValidationWidget(
@@ -334,6 +335,7 void CatalogueEventsWidget::setEventChanges(const std::shared_ptr<DBEvent> &even
334 335
335 336 impl->m_Model->setEventHasChanges(event, hasChanges);
336 337 }
338 }
337 339 else {
338 340 qCWarning(LOG_CatalogueEventsWidget())
339 341 << "setEventChanges: the event is not displayed in the model.";
@@ -225,7 +225,8 void CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::configureTreeWidget(
225 225 {
226 226 auto allEventsItem = new CatalogueTextTreeItem{QIcon{":/icones/allEvents.png"}, "All Events",
227 227 ALL_EVENT_ITEM_TYPE};
228 m_TreeModel->addTopLevelItem(allEventsItem);
228 auto allEventIndex = m_TreeModel->addTopLevelItem(allEventsItem);
229 treeView->setCurrentIndex(allEventIndex);
229 230
230 231 auto trashItem
231 232 = new CatalogueTextTreeItem{QIcon{":/icones/trash.png"}, "Trash", TRASH_ITEM_TYPE};
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved
author

Status change > Approved

You need to be logged in to leave comments. Login now