[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA-dev: [PATCH] gattrib: reorganize file opening code
Ivan --
> Here is the first patch in my patch series meant
> to simplify/improve/fix gattrib.
Thanks for doing all this work! You are a rock star!
> This patch is
> moderately intrusive and hasn't had extensive testing.
> As such, I would not consider it to be merged
> without testing it a bit more (it appears to work
> fine for me though). So please give it a try and
> report any issues.
I'll apply it later today when I am at my development machine.
> One thing I'm not sure about is the behaviour
> when the user has already opened several pages
> and then the File->Open is invoked to open another
> schematic (project?). I would much rather see
> this as a request to close the current project,
> destroy all the data (SHEET_DATA etc.) and reinitialize
> everything with the new project. (See my comments
> to the s_toplevel_menubar_file_open function.)
> Stuart, what do you think?
The way gattrib is architected, it's hard to merge pages on top of
pages already open.
More important, from a use-case standpoint, it
usually makes no sense to do any merging, IMO. That is, all
components & attribues are displayed on one big spreadsheet.
Therefore, once you open a bunch of .sch files and edit them, you
don't want to open a different project (and mix the components of both
designs) before closing out the first one.
I suppose one case where merging makes sense is if I have a 3 page
schematic, I open and edit pages 1 & 2, and then think "Oh! I forgot
page 3!", and then try to load it. In this case, I suppose it makes
sense to allow the user to merge page 3 into the spreadsheet already
holding pages 1 & 2. However, gattrib would need to do a ton of
checks for redundant refdeses before allowing this to happen. Is it
worth the effort? When I originally hacked out gattrib I asked myself
that question. I decided "no" since the user could simply save his
work, leave gattrib, and then open up sheet 3 independently to
finalize his work. Also because I was lazy. ;-)
I'd be willing to hear of other example uses from others who have a
different opinion.
Therefore, I tend to agree that if the user does file->open when an
existing project is already running, then gattrib should throw up a
warning box saying "Before I load new files, I need to close the
existing sheet. Continue?" Then it can close the old project and
re-initialize everything.
Stuart
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev