From: Mathias L. <ga...@sp...> - 2005-07-08 10:29:38
|
fre 2005-07-08 klockan 12.15 skrev Werner Schweer: > On Thursday 07 July 2005 23:21, Mathias Lundgren wrote: > .. > > One thing that I'm not really happy with today is the SC_* stuff. We're > > running out of SC flags, and it's only possible to notify listeners that > > a change has occured - not possible to give any parameters whatsoever, > > resulting in unnecessary updates all around the place. Perhaps it would > > be better to pass an undooperation union-type of structure around at > > SC-update time? Or perhaps I'm missing something? > > in the "current" branch i started to replace the SC_* update flags with > QT signal/slot constructs. They are not limited and can be used more fine > grained. You must only be careful to use them only in the gui thread. > > /Werner Ah, good! It's just my own fault that I'm hanging around in the wrong branch then. Another thing that has always mystified me is the scrollscale stuff. I've tried to understand the idea of it sometime, or two, but I'm loosing track in ScrollScale::setPos and the ScrollScale constructor. There are cryptic things here and there referring to xmag/2 etc... I've understood it's logarithmic but I've never understood the mapping between the xmag-value and the slider value. I've got the impression that it's used differently throughout the editors too. Sometimes, I've been thinking of implementing zoom-functions, but haven't been able to easily find a way of doing a reverse mapping (e.g. calculate what scale-value that should be used to achieve a certain xmag value). The mag-value seems to be negative at some times, and positive at other times. It's also annoying that when you zoom out using the slider the xoffset of the canvas is changed. I've seen that there has been changes to this in the new arranger, from what I recall things worked better there. Is this bound to change, or are we going to stick around with the current scrollscale? If so, is there a relatively easy way of explaining the general idea behind it (the mapping btwn the xmag value and the slider value + range)? /Mathias |