Skip to content
Snippets Groups Projects
Commit b8e85a67 authored by edgrif's avatar edgrif
Browse files

fix bad bugs in setting styles.

parent 1d99406f
No related branches found
No related tags found
No related merge requests found
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
* *
* Exported functions: See ZMap/zmapWindow.h * Exported functions: See ZMap/zmapWindow.h
* HISTORY: * HISTORY:
* Last edited: Jun 12 08:08 2009 (rds) * Last edited: Aug 13 16:45 2009 (edgrif)
* Created: Thu Jan 20 14:43:12 2005 (edgrif) * Created: Thu Jan 20 14:43:12 2005 (edgrif)
* CVS info: $Id: zmapWindowUtils.c,v 1.53 2009-06-19 11:17:11 rds Exp $ * CVS info: $Id: zmapWindowUtils.c,v 1.54 2009-08-14 10:15:53 edgrif Exp $
*------------------------------------------------------------------- *-------------------------------------------------------------------
*/ */
...@@ -282,13 +282,16 @@ void zMapWindowGetVisible(ZMapWindow window, double *top_out, double *bottom_out ...@@ -282,13 +282,16 @@ void zMapWindowGetVisible(ZMapWindow window, double *top_out, double *bottom_out
/* /*
* Noddy functions for handling our style lists within window. * Noddy functions for handling our style lists within window.
* *
* These might be noddy _but_ they are mucky, the logic in calling routines
* is muddied and we need to clear this up....
*
*/ */
gboolean zmapWindowUpdateStyles(ZMapWindow window, GData **read_only_styles, GData **display_styles) gboolean zmapWindowUpdateStyles(ZMapWindow window, GData **read_only_styles, GData **display_styles)
{ {
gboolean result = FALSE ; gboolean result = FALSE ;
if (read_only_styles) if (*read_only_styles)
{ {
if (window->read_only_styles) if (window->read_only_styles)
zMapStyleDestroyStyles(&(window->read_only_styles)) ; zMapStyleDestroyStyles(&(window->read_only_styles)) ;
...@@ -296,7 +299,7 @@ gboolean zmapWindowUpdateStyles(ZMapWindow window, GData **read_only_styles, GDa ...@@ -296,7 +299,7 @@ gboolean zmapWindowUpdateStyles(ZMapWindow window, GData **read_only_styles, GDa
result = zMapStyleCopyAllStyles(read_only_styles, &(window->read_only_styles)) ; result = zMapStyleCopyAllStyles(read_only_styles, &(window->read_only_styles)) ;
} }
if (read_only_styles) if (*display_styles)
{ {
if (window->display_styles) if (window->display_styles)
zMapStyleDestroyStyles(&(window->display_styles)) ; zMapStyleDestroyStyles(&(window->display_styles)) ;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment