Auto status change to "Under Review"
@@ -34,9 +34,9 struct CatalogueEventsModel::CatalogueEventsModelPrivate { | |||||
34 | case Column::Name: |
|
34 | case Column::Name: | |
35 | return event->getName(); |
|
35 | return event->getName(); | |
36 | case Column::TStart: |
|
36 | case Column::TStart: | |
37 |
return |
|
37 | return DateUtils::dateTime(event->getTStart()); | |
38 | case Column::TEnd: |
|
38 | case Column::TEnd: | |
39 |
return |
|
39 | return DateUtils::dateTime(event->getTEnd()); | |
40 | case Column::Product: { |
|
40 | case Column::Product: { | |
41 | auto eventProductsIt = m_EventProducts.find(event.get()); |
|
41 | auto eventProductsIt = m_EventProducts.find(event.get()); | |
42 | if (eventProductsIt != m_EventProducts.cend()) { |
|
42 | if (eventProductsIt != m_EventProducts.cend()) { | |
@@ -337,8 +337,8 QMimeData *CatalogueEventsModel::mimeData(const QModelIndexList &indexes) const | |||||
337 |
|
337 | |||
338 | if (isFirst) { |
|
338 | if (isFirst) { | |
339 | isFirst = false; |
|
339 | isFirst = false; | |
340 |
|
|
340 | firstTimeRange.m_TStart = event->getTStart(); | |
341 |
|
|
341 | firstTimeRange.m_TEnd = event->getTEnd(); | |
342 | } |
|
342 | } | |
343 | } |
|
343 | } | |
344 | else if (type == ItemType::EventProduct) { |
|
344 | else if (type == ItemType::EventProduct) { |
@@ -137,27 +137,29 struct CatalogueEventsWidget::CatalogueEventsWidgetPrivate { | |||||
137 |
|
137 | |||
138 | if (selectedRows.count() == 1) { |
|
138 | if (selectedRows.count() == 1) { | |
139 | auto event = m_Model->getEvent(selectedRows.first()); |
|
139 | auto event = m_Model->getEvent(selectedRows.first()); | |
140 |
if ( |
|
140 | if (event) { | |
141 |
if ( |
|
141 | if (m_VisualizationWidget) { | |
142 |
|
142 | if (auto tab = m_VisualizationWidget->currentTabWidget()) { | ||
143 | for (auto zoneName : m_ZonesForTimeMode) { |
|
143 | ||
144 |
|
|
144 | for (auto zoneName : m_ZonesForTimeMode) { | |
145 | SqpRange eventRange; |
|
145 | if (auto zone = tab->getZoneWithName(zoneName)) { | |
146 |
|
|
146 | SqpRange eventRange; | |
147 |
|
|
147 | eventRange.m_TStart = event->getTStart(); | |
148 |
|
|
148 | eventRange.m_TEnd = event->getTEnd(); | |
|
149 | zone->setZoneRange(eventRange); | |||
|
150 | } | |||
149 | } |
|
151 | } | |
150 | } |
|
152 | } | |
|
153 | else { | |||
|
154 | qCWarning(LOG_CatalogueEventsWidget()) | |||
|
155 | << "updateTimeZone: no tab found in the visualization"; | |||
|
156 | } | |||
151 | } |
|
157 | } | |
152 | else { |
|
158 | else { | |
153 | qCWarning(LOG_CatalogueEventsWidget()) |
|
159 | qCWarning(LOG_CatalogueEventsWidget()) | |
154 |
<< "updateTimeZone: |
|
160 | << "updateTimeZone: visualization widget not found"; | |
155 | } |
|
161 | } | |
156 | } |
|
162 | } | |
157 | else { |
|
|||
158 | qCWarning(LOG_CatalogueEventsWidget()) |
|
|||
159 | << "updateTimeZone: visualization widget not found"; |
|
|||
160 | } |
|
|||
161 | } |
|
163 | } | |
162 | else { |
|
164 | else { | |
163 | qCWarning(LOG_CatalogueEventsWidget()) |
|
165 | qCWarning(LOG_CatalogueEventsWidget()) |
@@ -127,8 +127,8 void CatalogueInspectorWidget::setEvent(const std::shared_ptr<DBEvent> &event) | |||||
127 | ui->dateTimeEventTStart->setEnabled(false); |
|
127 | ui->dateTimeEventTStart->setEnabled(false); | |
128 | ui->dateTimeEventTEnd->setEnabled(false); |
|
128 | ui->dateTimeEventTEnd->setEnabled(false); | |
129 |
|
129 | |||
130 |
|
|
130 | ui->dateTimeEventTStart->setDateTime(DateUtils::dateTime(event->getTStart())); | |
131 |
|
|
131 | ui->dateTimeEventTEnd->setDateTime(DateUtils::dateTime(event->getTEnd())); | |
132 |
|
132 | |||
133 | blockSignals(false); |
|
133 | blockSignals(false); | |
134 | } |
|
134 | } |
General Comments 3
Status change > Approved
You need to be logged in to leave comments.
Login now