Matrix cntl-drag fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@14873 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-10-30 03:02:44 +00:00
parent 01eee8a433
commit 4d7ac746c7
3 changed files with 17 additions and 1716 deletions

View file

@ -1,3 +1,10 @@
2002-10-29 Adam Fedor <fedor@gnu.org>
* GormMatrixEditor.m (-_constrainedFrame:framewithEvent:andKnob:knob):
Set height/width to 0 when rows/cols = 1.
(-validateFrame:framewithEvent:theEventandPlacementInfo:): Idem.
* GormWindowEditor.m: Remove commented out code.
2002-10-29 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* GormDocument.m: change nameTable retaining policy from

View file

@ -491,15 +491,16 @@ static BOOL done_editing;
int cols = [_EO numberOfColumns];
NSSize cellSize = [_EO cellSize];
width = ( frame.size.width - cellSize.width * cols) / (cols - 1);
height = ( frame.size.height - cellSize.height * rows ) / (rows - 1);
height = width = 0;
if (cols > 1)
width = ( frame.size.width - cellSize.width * cols) / (cols - 1);
if (rows > 1)
height = ( frame.size.height - cellSize.height * rows ) / (rows - 1);
width *= (cols - 1);
width += cellSize.width * cols;
height *= (rows - 1);
height += cellSize.height * rows;
}
else
{
@ -643,8 +644,11 @@ static BOOL done_editing;
[self setFrame: frame];
width = ( frame.size.width - cellSize.width * cols) / (cols - 1);
height = ( frame.size.height - cellSize.height * rows ) / (rows - 1);
height = width = 0;
if (cols > 1)
width = ( frame.size.width - cellSize.width * cols) / (cols - 1);
if (rows > 1)
height = ( frame.size.height - cellSize.height * rows ) / (rows - 1);
[_EO setIntercellSpacing: NSMakeSize(width, height)];
}

File diff suppressed because it is too large Load diff