SF.net SVN: supercollider: [7657] trunk/Source/app

View: New views
1 Messages — Rating Filter:   Alert me  

SF.net SVN: supercollider: [7657] trunk/Source/app

by cruxxial :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Revision: 7657
          http://svn.sourceforge.net/supercollider/?rev=7657&view=rev
Author:   cruxxial
Date:     2008-07-07 01:37:53 -0700 (Mon, 07 Jul 2008)

Log Message:
-----------
blackrain's fixes for the relativeOrigin problems with the various cocoa views : SCTextView SCSoundFileView SCQuartzComposerView SCMovieView

Modified Paths:
--------------
    trunk/Source/app/SCCocoaView.M
    trunk/Source/app/SCSoundFileView.M

Modified: trunk/Source/app/SCCocoaView.M
===================================================================
--- trunk/Source/app/SCCocoaView.M 2008-07-05 22:29:42 UTC (rev 7656)
+++ trunk/Source/app/SCCocoaView.M 2008-07-07 08:37:53 UTC (rev 7657)
@@ -309,7 +309,7 @@
  mBounds = inBounds;
  [[mScrollView superview] setNeedsDisplayInRect:[mScrollView frame]];
  if(mParent->relativeOrigin()){
- SCRect pbounds = mParent->getBounds();
+ SCRect pbounds = mParent->getLayout().bounds; // relative origin fix
  mLayout.bounds.x = mBounds.x + pbounds.x;
  mLayout.bounds.y = mBounds.y + pbounds.y;
  mLayout.bounds.width = mBounds.width;
@@ -318,12 +318,12 @@
  mLayout.bounds = mBounds;
  }
  [mScrollView setFrame: SCtoNSRect(mLayout.bounds)];
- [mTextView setFrame: SCtoNSRect(mLayout.bounds)];
+ [mTextView setFrame: SCtoNSRect(mLayout.bounds)]; // not needed - br
 
  // [mScrollView setBounds: SCtoNSRect(mBounds)];
  // [mTextView setBounds: SCtoNSRect(mBounds)];
- [mScrollView setNeedsDisplay: YES];
- [mTextView setNeedsDisplay: YES];
+ // [mScrollView setNeedsDisplay: YES]; // not needed - br
+ // [mTextView setNeedsDisplay: YES]; // not needed - br
 }
 
 void SCCocoaTextView::keyDown(int character, int modifiers, unsigned short keycode)
@@ -704,7 +704,7 @@
  [[mMovieView superview] setNeedsDisplayInRect:[mMovieView frame]];
  mBounds = screct;
  if(mParent->relativeOrigin()){
- SCRect pbounds = mParent->getBounds();
+ SCRect pbounds = mParent->getLayout().bounds; // relative origin fix
  mLayout.bounds.x = mBounds.x + pbounds.x;
  mLayout.bounds.y = mBounds.y + pbounds.y;
  mLayout.bounds.width = mBounds.width;
@@ -952,7 +952,7 @@
  [[mQCView superview] setNeedsDisplayInRect:[mQCView frame]];
  mBounds = screct;
  if(mParent->relativeOrigin()){
- SCRect pbounds = mParent->getBounds();
+ SCRect pbounds = mParent->getLayout().bounds; // relative origin fix
  mLayout.bounds.x = mBounds.x + pbounds.x;
  mLayout.bounds.y = mBounds.y + pbounds.y;
  mLayout.bounds.width = mBounds.width;

Modified: trunk/Source/app/SCSoundFileView.M
===================================================================
--- trunk/Source/app/SCSoundFileView.M 2008-07-05 22:29:42 UTC (rev 7656)
+++ trunk/Source/app/SCSoundFileView.M 2008-07-07 08:37:53 UTC (rev 7657)
@@ -238,10 +238,9 @@
  if(mSndBuf.channels)
  bufAllocMinMax(&mSndMinMax, mSndBuf.channels, (int)(inBounds.width ));
  }
-// mBounds = inBounds;
     mBounds = inBounds;
  if(mParent->relativeOrigin()){
- SCRect pbounds = mParent->getBounds();
+ SCRect pbounds = mParent->getLayout().bounds; // relative origin fix
  mLayout.bounds.x = mBounds.x + pbounds.x;
  mLayout.bounds.y = mBounds.y + pbounds.y;
  mLayout.bounds.width = mBounds.width;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
_______________________________________________
sc-dev mailing list
sc-dev@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-dev