#757 - Implement a Site subtab for ground temperatures#859
Open
#757 - Implement a Site subtab for ground temperatures#859
Conversation
53954ab to
d61e711
Compare
Replace OSItem-based left panel with ScheduleTabDefault-style static entries The current SiteGroundTemperatureMonthlyListView uses OSItemSelector + custom OSItem subclasses. This results in a "NO ICON" placeholder next to each entry because OSItem always reserves space for an icon. I aim to have the visual style of the Schedules tab's ScheduleTabDefault: plain clickable text labels, no icon, with a "not present" fallback view (like NewProfileView) that offers an Add button if the unique object doesn't exist yet.
unbind() (line 190):
setLocked(true); // → m_lineEdit->setReadOnly(true)
Old completeBind() (before my fix) — line 160:
setEnabled(true); // enables outer widget, but m_lineEdit->readOnly is still true!
My fix (line 159):
m_lineEdit->setLocked(false); // resets readOnly before enabling
setEnabled(true);
The fix is safe because QuantityLineEdit::setLocked guards with if (m_locked != locked), so calling setLocked(false) on a fresh (never-unbound) edit is a no-op. The old code had the same latent bug; it
was just never exposed because the original UI was broken in a more visible way ("NO ICON" items) before the full switch to the new widget pattern.
d61e711 to
ae6d2ab
Compare
… and not OSDropZone... This reverts commit 731a258.
…l rendering. The QSS + property approach is strictly better: - Qt handles all rendering (no manual fillRect/drawLine) - :hover pseudo-selector replaces m_hovering, mouseMoveEvent, leaveEvent - setSelected() just toggles the property + unpolish/polish - paintEvent reduces to the standard QStyleOption boilerplate
…pplyConstantValue
…lds get insanely too small in height when I have the App window as small as possible
Min window size is there
openstudio_lib/MainWindow.cpp
143: return {1024, 700}
OSQuantityEdit2 and QLabel widgets have no explicit minimum height, so when vertical space is tight, they get compressed before the chart (which has setMinimumHeight(220)). The proper
fix is a QScrollArea around the content so it can scroll rather than compress.
…0.5m EPW data https://bigladdersoftware.com/epx/docs/25-1/input-output-reference/group-location-climate-weather-file-access.html#sitegroundtemperaturefcfactormethod > If user does not input this object in the IDF file, it will be defaulted to the 0.5m set of monthly ground temperatures from the weather file if they are available.
In GroundTemperatureView.cpp:290, the lambda captures it (an iterator into ground_temps), but ground_temps is a local variable that goes out of scope when setType returns. By the time the button is clicked, it is a dangling iterator — classic UB that happens to be harmless on Linux but corrupts on macOS. The fix: capture the EpwGroundTemperatureDepth value instead of the iterator.
macumber
reviewed
Mar 8, 2026
| mainLayout->setSpacing(20); | ||
| setLayout(mainLayout); | ||
|
|
||
| auto* titleLabel = new QLabel("Site:WaterMainsTemperature"); |
Collaborator
There was a problem hiding this comment.
You can delete this with the red X in the object type selector, but it isn't completely obvious. It might be nice to add a delete button here too?
Collaborator
|
This is really impressive @jmarrec, left one optional idea to add a second remove button inside the object inspector |
macumber
approved these changes
Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For now I added:
Old screen 2026-03-05-757-GroundTemp
Latest work, where I added a Bar chart and the Site:GroundTemperature:FCfactorMethod
TODO: