New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
86121908 copy schedule #1371
86121908 copy schedule #1371
Conversation
…need some additional improvements though [#86121908]
…k this over with people tomorrow @kbenne are you interested or pass?
… to enter values Can't figure out how to get the font correct when hovering Can't automatically select default schedule because graphic scene does not seem to work when not visible
@asparke2 @DavidGoldwasser this is ready to review. Includes ability to copy schedules and the various schedule editor improvements we discussed. Only one I was not able to do was "When click on schedule show the default profile" |
@macumber Looks pretty good, a few minor things: New schedule dialog: Schedule UI: Other Minor Things (don't change unless very easy): |
Thanks @asparke2, I'll get on it I worry that putting the values over each segment would be too cluttered, I'll see if it is easy to do to try it out I wasn't going to stretch to the copy rule button but maybe I will do that |
Discrete temperature schedules are: https://github.com/NREL/OpenStudio/blob/develop/openstudiocore/src/model/ScheduleTypeRegistry.cpp#L171 https://github.com/NREL/OpenStudio/blob/develop/openstudiocore/src/model/ScheduleTypeRegistry.cpp#L296 https://github.com/NREL/OpenStudio/blob/develop/openstudiocore/src/model/ScheduleTypeRegistry.cpp#L311 I'm not sure why these would require a discrete temperature schedule (or what that would even mean). @asparke2 @kbenne @mbadams5 any ideas on the repercussions of making these continuous? |
@asparke2 I allow users to use any user created schedule type limits in their model, I figure if they have put them there they would have given them good names and know what to look for The alternative would be to only allow users to select the built in schedule types when creating a new schedule |
@lefticus CppCheck is finding a memory error at this line https://nrel.github.io/OpenStudioBuildResults/OpenStudio-d64bacf14a2f37403310f227856763d6df969e67-x86_64-Linux-Ubuntu-14.04-cppcheck-1.61.html I don't doubt that I might be doing this wrong but the way I read the realloc page is that you don't have to delete the pointer before calling realloc? Should I just call delete and then malloc to be safe? |
"Enter Value" text is too small (maybe increase to same size as axis labels?) I don't quite understand what is going on here, I'm using a QGraphicsTextItem and have to set the font to something enormous for it to even be visible: Setting font in html doesn't seem to work. @axelstudios @kbenne @evanweaver have you ever used QGraphicsTextItem? Do you know how to get it to look right? |
@macumber I have used graphics text. In the HVAC outliner for example. What is going on here is that there is some extreme scaling tricks going in in the graphics view to enable zoom and scroll. I don't remember all of the details, but basically this is why I say I made a mistake when I used QGraphicsView to enable the zoom feature in the schedules view. |
…r and lower limits in IP. [#86121908]
@kbenne thanks, I think the solution will be to figure out the scaling and apply the inverse to the text in some way. What is your availability to look at this on this branch? |
@macumber the problem is that I believe they would have you do something like: auto newptr = (LPBYTE)realloc(lpBuffer, dwBufferSize);
if (newptr == nullptr) {
// whoops we had a memory allocation error and we need to clean things up
free(lpBuffer);
throw std::runtime_error("Memory error while attempting to allocate buffer")
} else {
lpBuffer = newptr;
}
moreData = true; This way you properly handle the error condition, not just leak memory if something with If you do encounter an error here, it's likely fatal, as the system probably ran out of RAM. So an even more abrupt |
@lefticus thanks for the tip, I implemented your solution |
@asparke2 this is good for you to review again |
…fter reviewing with you and Marj
No description provided.