OpenStudioApplication icon indicating copy to clipboard operation
OpenStudioApplication copied to clipboard

Delete a measure, re-add it from library: no prompt and duplicated folders

Open jmarrec opened this issue 8 years ago • 7 comments

System info:

  • Sketchup 2016
  • macOS Sierra 10.12.2
  • OpenStudio 2.0.0 (47ba3cbe19)

There seem to be a small bug that you might have noticed too with Measures on mac (aside from not telling you it’s broken and not giving you any message that can help), where you delete a measure and re-add it from library

  1. It doesn’t ask anything (no "Update all previous reference to measure?" or something)
  2. You end up with a new folder named “Measure blablabla 1", as you redo that it can get quite huge

In model/measures:

screen shot 2017-01-10 at 17 27 09

jmarrec avatar Jan 10 '17 16:01 jmarrec

@jmarrec is this inside of a PAT project, an OS App model, your My Measures directory, or somewhere else?

asparke2 avatar May 10 '17 20:05 asparke2

OS App model, happen in model/measures folder

jmarrec avatar May 12 '17 09:05 jmarrec

Still relevant as of 2.2.1

jmarrec avatar Sep 29 '17 07:09 jmarrec

Hi, I'm also having this issue using v2.4.1, Windows 7 Enterprise. After deleting a measure then add back on in openstudio measure tab, in the measure folder it adds a new folder ended with those "1"s.

And if I edit the current measure.rb file (for example debugging my measure in my measure folder), synchronize with library and rerun the program, the previous error still shows in openstudio. After a couple times, I realized it is because all these previous measure files are not updated. But for whatever reason, even if i delete the measure folder, it still creates all these previous measure files ("1" ~ "1 1 1 1 1 1") when I hit run and all those previous measure files are the "old" version.

The only thing I can do to bypass this right now is to copy the osm file only and rename it, start a clean new file without any measures, then apply the updated measure.

Is there any update on this issue? Thanks.

crossingchen avatar Apr 22 '18 18:04 crossingchen

Just reproduced this with current develop (9edf6e6a7845053047b4dfc82113e08cade23fc9, 2.6.0 basically) on Ubuntu 16.04

jmarrec avatar Jul 13 '18 11:07 jmarrec

Check out WorkflowController.cpp#L224.

The problem is that we don't want to delete the directory from disk until the user actually saves...

jmarrec avatar Sep 03 '18 15:09 jmarrec

Updating with permalink to this repo: https://github.com/openstudiocoalition/OpenStudioApplication/blob/fd5afb70ccde5acd4f32d08e2beb48fb4df8b59e/src/shared_gui_components/WorkflowController.cpp#L184-L207

jmarrec avatar May 31 '21 23:05 jmarrec