##// END OF EJS Templates
Hack to download first component of a parameter if the parameter is a vector...
Alexandre Leroux -
r384:348a77304894
parent child
Show More
@@ -1,4 +1,5
1 1 #include "AmdaPlugin.h"
2 #include "AmdaDefs.h"
2 3 #include "AmdaParser.h"
3 4 #include "AmdaProvider.h"
4 5
@@ -31,6 +32,15 void associateActions(DataSourceItem &item, const QUuid &dataSourceUid)
31 32
32 33 const auto itemType = item.type();
33 34 if (itemType == DataSourceItemType::PRODUCT) {
35 /// @todo : As for the moment we do not manage the loading of vectors, in the case of a
36 /// parameter, we update the identifier of download of the data:
37 /// - if the parameter has no component, the identifier remains the same
38 /// - if the parameter has at least one component, the identifier is that of the first
39 /// component (for example, "imf" becomes "imf (0)")
40 if (item.childCount() != 0) {
41 item.setData(AMDA_XML_ID_KEY, item.child(0)->data(AMDA_XML_ID_KEY));
42 }
43
34 44 addLoadAction(QObject::tr("Load %1 product").arg(item.name()));
35 45 }
36 46 else if (itemType == DataSourceItemType::COMPONENT) {
General Comments 0
You need to be logged in to leave comments. Login now