Am Wed, 2 Jun 2010 22:12:20 +0200
schrieb Jérémy Zurcher <[email protected]>:

> Hi there,
> 
> /***************/
> right click on a pattern and load a new one,
> a pattern is saved through : int LocalFileMng::savePattern( ... );
>     mode = 4 => sPatternXmlFilename = patternname;
> 
> so it's saved within current dir not tmp dir used for undo/redo.
> 
> As I'm not working on this actually I'll let who wants to fix it ;)
we can remove mode 4. its the same than mode 2. and both modes use the filename 
which
comes as third argument.

the function who use mode 4 contains as third argument the pattern-filename.
for example in songeditor.cpp line 1463:
QString patternFilename = Preferences::get_instance()->getTmpDirectory() 
+QString("%1").arg(thetime)+ QString( "PAT.xml" );

you see the name include the h2 tmp dir. also this dir will send as argument to 
the undo stack.
line 1468:
SE_copyPatternAction *action = new SE_copyPatternAction( patternFilename , 
pPatternList->get_size() );
later its possible to undo this, because the clear filename is stored into 
undostack.

i think i have forgotten to revert the mode 4 into LocalFileMng if i have 
finished subsequent undo functions.
sometimes the functions i have create for undo in a earlier stage of 
development need a
rewrite because later on a other place in code arise new dependency's to hold 
the undo
stack consistent.

what ever. i also think it is better to move this tmp pattern from disk to 
memory. if i create the function i think its important to save memory in undo 
stack.
but patterns are very small and now i think its much better to copy this 
tmp-pattern into the undo stack.


> 
> /***************/
> Questions about Pattern :
> 
> std::set<Pattern*> virtual_pattern_set;
> keeps a list a virtual patterns.
> 
> but what is exactly 
> std::set<Pattern*> virtual_pattern_transitive_closure_set;
> for ??
> 
> void addEdges(H2Core::Pattern::virtual_patterns_t &patternSet);
> seems weird to me, is the recurtion usefull ???
> 
> I definitly miss something, but don't have time to bang my head on this.
> 
> Someone could enlighten me please ??

hmm,
i don't understand your question. do you don't understand the use of the 
virtual pattern function himself. if not i hope this help.
the virtual pattern thing is really magic. i like it very much. if you are one, 
who
works with stacked pattern into a song creation, you will love this function 
which
simplify a song-composition in songmode and save a lot of clicking.
you can define a pattern as virtual pattern/meta pattern and allocate him some 
pattern you have already created and which contains parts of your song 
composition.

e.g.:
verse = pattern 1 + 2 = virtual-pattern 10
verse variation = pattern 1 + 2 + 4 = virtual pattern 11
chorus = pattern 1 + 3 = virtual-pattern 12
chorus variation = 1 + 3 + 5 = virtual-pattern 13
and so on...
now you can click only on your meta pattern to activate a stack for a 
song-position.

and if i am wrong and you already know this, i can not say so much about the 
code. it was a patch from a user.
i only have rewrite some parts around to make stacked pattern undo able.

greetings wolke

> 
> thanks in advance ...
> 
> greetings
> 

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to