Skip to content

Commit 0d0a373

Browse files
committed
Fix minor bug and update message description for incompatible measures
1 parent 4b383bc commit 0d0a373

17 files changed

Lines changed: 40 additions & 37 deletions

src/shared_gui_components/BuildingComponentDialogCentralWidget.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ void BuildingComponentDialogCentralWidget::setTid() {
170170

171171
std::vector<openstudio::BCLSearchResult> BuildingComponentDialogCentralWidget::fetchAndSortResponses(const std::string& filterType, int tid, const QString& searchString) {
172172
m_allResponses.clear();
173+
173174
RemoteBCL remoteBCL;
175+
remoteBCL.setTimeOutSeconds(m_timeoutSeconds);
176+
174177
std::vector<BCLSearchResult> responses;
175178
int totalPages = 1;
176179
int currentPage = 0;
@@ -203,16 +206,16 @@ void BuildingComponentDialogCentralWidget::setTid(const std::string& filterType,
203206
std::string newKey = std::to_string(tid) + filterType + searchString.toStdString();
204207
std::string currentKey = std::to_string(m_tid) + m_filterType + m_searchString.toStdString();
205208

206-
m_collapsibleComponentList->firstPage();
209+
m_searchString = searchString;
210+
m_filterType = filterType;
211+
m_tid = tid;
207212

208213
if (newKey != currentKey) {
209214
m_allResponses = fetchAndSortResponses(filterType, tid, searchString);
215+
m_collapsibleComponentList->firstPage();
216+
pageIdx = 0;
210217
}
211218

212-
m_searchString = searchString;
213-
m_filterType = filterType;
214-
m_tid = tid;
215-
216219
// Clear existing components
217220
std::vector<Component*> components = m_componentList->components(); // TODO replace with code above
218221
for (auto& comp : components) {

src/shared_gui_components/BuildingComponentDialogCentralWidget.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#include <openstudio/nano/nano_signal_slot.hpp> // Signal-Slot replacement
1717
#include <openstudio/utilities/bcl/BCLComponent.hpp>
1818
#include <openstudio/utilities/bcl/BCLMeasure.hpp>
19+
#include <openstudio/utilities/bcl/BCL.hpp>
1920

2021
#include "../shared_gui_components/ProgressBarWithError.hpp"
2122

2223
#include <boost/optional.hpp>
23-
#include "../../../OpenStudio/src/utilities/bcl/BCL.hpp"
2424

2525
class QTimer;
2626

@@ -55,7 +55,7 @@ class BuildingComponentDialogCentralWidget
5555
void setTid();
5656
void componentDownloadComplete(const std::string& uid, const boost::optional<BCLComponent>& component);
5757
void measureDownloadComplete(const std::string& uid, const boost::optional<BCLMeasure>& measure);
58-
std::vector<BCLSearchResult> m_allResponses;
58+
std::vector<openstudio::BCLSearchResult> m_allResponses;
5959

6060
std::vector<openstudio::BCLSearchResult> fetchAndSortResponses(const std::string& filterType, int tid, const QString& searchString);
6161

src/shared_gui_components/Component.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Component::Component(const BCLMeasure& bclMeasure, bool showAbridgedView, bool s
5454
setCheckBoxEnabled(false);
5555
m_updateAvailable = false;
5656
if (m_msg) {
57-
m_msg->setText("This measure requires a newer version of OpenStudio");
57+
m_msg->setText("This measure is not compatible with the current version of OpenStudio");
5858
m_msg->setVisible(true);
5959
}
6060
}
@@ -131,7 +131,7 @@ Component::Component(const BCLSearchResult& bclSearchResult, bool showAbridgedVi
131131
setCheckBoxEnabled(false);
132132
m_updateAvailable = false;
133133
if (m_msg) {
134-
m_msg->setText("This measure requires a newer version of OpenStudio");
134+
m_msg->setText("This measure is not compatible with the current version of OpenStudio");
135135
m_msg->setVisible(true);
136136
}
137137
}

translations/OpenStudioApp_ar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,12 +727,12 @@ If you would like to see the OpenStudioApplication translated in your language o
727727
<context>
728728
<name>openstudio::MainWindow</name>
729729
<message>
730-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="394"/>
730+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="406"/>
731731
<source>Allow Analytics</source>
732732
<translation type="unfinished"></translation>
733733
</message>
734734
<message>
735-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="395"/>
735+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="407"/>
736736
<source>Allow OpenStudio Coalition to collect anonymous usage statistics to help improve the OpenStudio Application? See the &lt;a href=&quot;https://openstudiocoalition.org/about/privacy_policy/&quot;&gt;privacy policy&lt;/a&gt; for more information.</source>
737737
<translation type="unfinished"></translation>
738738
</message>

translations/OpenStudioApp_ca.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,12 +819,12 @@ Si voleu que OpeStudioApplication estigui a la vostra llengua, esperem la vostra
819819
<translation type="obsolete">S&apos;ha de reiniciar</translation>
820820
</message>
821821
<message>
822-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="394"/>
822+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="406"/>
823823
<source>Allow Analytics</source>
824824
<translation type="unfinished"></translation>
825825
</message>
826826
<message>
827-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="395"/>
827+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="407"/>
828828
<source>Allow OpenStudio Coalition to collect anonymous usage statistics to help improve the OpenStudio Application? See the &lt;a href=&quot;https://openstudiocoalition.org/about/privacy_policy/&quot;&gt;privacy policy&lt;/a&gt; for more information.</source>
829829
<translation type="unfinished"></translation>
830830
</message>

translations/OpenStudioApp_de.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,12 +827,12 @@ Wenn Sie möchten, dass die OpenStudio-Applikation in die Sprache Ihrer Wahl üb
827827
<translation type="obsolete">Neustart erforderlich</translation>
828828
</message>
829829
<message>
830-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="394"/>
830+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="406"/>
831831
<source>Allow Analytics</source>
832832
<translation type="unfinished"></translation>
833833
</message>
834834
<message>
835-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="395"/>
835+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="407"/>
836836
<source>Allow OpenStudio Coalition to collect anonymous usage statistics to help improve the OpenStudio Application? See the &lt;a href=&quot;https://openstudiocoalition.org/about/privacy_policy/&quot;&gt;privacy policy&lt;/a&gt; for more information.</source>
837837
<translation type="unfinished"></translation>
838838
</message>

translations/OpenStudioApp_el.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,12 +817,12 @@ If you would like to see the OpenStudioApplication translated in your language o
817817
<translation type="obsolete">Απαιτείται επανεκκίνηση</translation>
818818
</message>
819819
<message>
820-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="394"/>
820+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="406"/>
821821
<source>Allow Analytics</source>
822822
<translation type="unfinished"></translation>
823823
</message>
824824
<message>
825-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="395"/>
825+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="407"/>
826826
<source>Allow OpenStudio Coalition to collect anonymous usage statistics to help improve the OpenStudio Application? See the &lt;a href=&quot;https://openstudiocoalition.org/about/privacy_policy/&quot;&gt;privacy policy&lt;/a&gt; for more information.</source>
827827
<translation type="unfinished"></translation>
828828
</message>

translations/OpenStudioApp_es.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,12 +818,12 @@ Si le gustaría ver la AplicaciónOpenStudio traducido a algun otro lenguaje, le
818818
<translation type="obsolete">Se requiere reiniciar</translation>
819819
</message>
820820
<message>
821-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="394"/>
821+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="406"/>
822822
<source>Allow Analytics</source>
823823
<translation type="unfinished"></translation>
824824
</message>
825825
<message>
826-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="395"/>
826+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="407"/>
827827
<source>Allow OpenStudio Coalition to collect anonymous usage statistics to help improve the OpenStudio Application? See the &lt;a href=&quot;https://openstudiocoalition.org/about/privacy_policy/&quot;&gt;privacy policy&lt;/a&gt; for more information.</source>
828828
<translation type="unfinished"></translation>
829829
</message>

translations/OpenStudioApp_fa.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,12 +817,12 @@ If you would like to see the OpenStudioApplication translated in your language o
817817
<translation type="obsolete">راه اندازی مجدد لازم است</translation>
818818
</message>
819819
<message>
820-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="394"/>
820+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="406"/>
821821
<source>Allow Analytics</source>
822822
<translation type="unfinished"></translation>
823823
</message>
824824
<message>
825-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="395"/>
825+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="407"/>
826826
<source>Allow OpenStudio Coalition to collect anonymous usage statistics to help improve the OpenStudio Application? See the &lt;a href=&quot;https://openstudiocoalition.org/about/privacy_policy/&quot;&gt;privacy policy&lt;/a&gt; for more information.</source>
827827
<translation type="unfinished"></translation>
828828
</message>

translations/OpenStudioApp_fr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,12 +817,12 @@ Si vous voulez voir l&apos;Application OpenStudio traduite dans la langue de vot
817817
<translation type="obsolete">Redémarrage requis</translation>
818818
</message>
819819
<message>
820-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="394"/>
820+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="406"/>
821821
<source>Allow Analytics</source>
822822
<translation type="unfinished"></translation>
823823
</message>
824824
<message>
825-
<location filename="../src/openstudio_lib/MainWindow.cpp" line="395"/>
825+
<location filename="../src/openstudio_lib/MainWindow.cpp" line="407"/>
826826
<source>Allow OpenStudio Coalition to collect anonymous usage statistics to help improve the OpenStudio Application? See the &lt;a href=&quot;https://openstudiocoalition.org/about/privacy_policy/&quot;&gt;privacy policy&lt;/a&gt; for more information.</source>
827827
<translation type="unfinished"></translation>
828828
</message>

0 commit comments

Comments
 (0)