Skip to content

Commit

Permalink
misc (OpenGL error on ROI arrow)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossetantoine committed Feb 23, 2014
1 parent 713e295 commit 797fa15
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -4288,7 +4288,7 @@ - (void) applicationWillFinishLaunching: (NSNotification *) aNotification

if( [AppController hasMacOSXSyrah])
{
if( [[NSUserDefaults standardUserDefaults] boolForKey: @"hideSyrahWarning"] == NO)
// if( [[NSUserDefaults standardUserDefaults] boolForKey: @"hideSyrahWarning"] == NO)
{
NSAlert* alert = [[NSAlert new] autorelease];
[alert setMessageText: NSLocalizedString( @"Mac OS Version", nil)];
Expand Down
16 changes: 6 additions & 10 deletions Binaries/dcmtk-source/ofstd/ofcond.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,17 +356,13 @@ class OFCondition
/// copy assignment operator
OFCondition& operator=(const OFCondition& arg)
{
if (&arg != this)
if (&arg != this && &arg && arg.theCondition)
{
if (theCondition->deletable())
{
delete OFconst_cast(OFConditionBase *, theCondition); // cast away const
}
if( &arg && arg.theCondition)
{
theCondition = arg.theCondition->clone();
assert(theCondition);
}
if (theCondition->deletable())
delete OFconst_cast(OFConditionBase *, theCondition); // cast away const

theCondition = arg.theCondition->clone();
assert(theCondition);
}
return *this;
}
Expand Down
11 changes: 6 additions & 5 deletions DCMView.m
Original file line number Diff line number Diff line change
Expand Up @@ -7998,8 +7998,9 @@ - (void) drawTextualData:(NSRect) size annotationsLevel:(long) annotations fullT
fontList = fontListGL;
_stringSize = stringSize;
// }

if (annotations == 4) [[NSNotificationCenter defaultCenter] postNotificationName: OsirixDrawTextInfoNotification object: self];

if (annotations == 4)
[[NSNotificationCenter defaultCenter] postNotificationName: OsirixDrawTextInfoNotification object: self];
else if( annotations > annotGraphics)
{
if( NSIsEmptyRect( screenCaptureRect) == NO)
Expand Down Expand Up @@ -11433,12 +11434,12 @@ -(void) setScaleValueCentered:(float) x

- (void) setScaleValue:(float) x
{
if( x < 0.01 ) return;
if( x > 100) return;
if( isnan( x)) return;
if( curImage < 0) return;
if( curDCM == nil) return;

if( x < 0.01) x = 0.01;
if( x > 100) x = 100;

if( scaleValue != x )
{
scaleValue = x;
Expand Down
20 changes: 10 additions & 10 deletions ROI.m
Original file line number Diff line number Diff line change
Expand Up @@ -5056,16 +5056,16 @@ - (void) drawROIWithScaleValue:(float)scaleValue offsetX:(float)offsetx offsetY:
glVertex2f( aa3.x, aa3.y);

glEnd();
glBegin(GL_LINE_LOOP);
glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(color.red / 65535., color.green / 65535., color.blue / 65535., opacity);

glVertex2f( aa1.x, aa1.y);
glVertex2f( aa2.x, aa2.y);
glVertex2f( aa3.x, aa3.y);

glEnd();
//
// glBegin(GL_LINE_LOOP);
// glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// glColor4f(color.red / 65535., color.green / 65535., color.blue / 65535., opacity);
//
// glVertex2f( aa1.x, aa1.y);
// glVertex2f( aa2.x, aa2.y);
// glVertex2f( aa3.x, aa3.y);
//
// glEnd();
}
else
{
Expand Down

0 comments on commit 797fa15

Please sign in to comment.