Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
ba752234
Commit
ba752234
authored
15 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
fix issue with containerDestroy for empty columns
parent
489529c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapWindow/zmapWindowDrawFeatures.c
+43
-33
43 additions, 33 deletions
src/zmapWindow/zmapWindowDrawFeatures.c
with
43 additions
and
33 deletions
src/zmapWindow/zmapWindowDrawFeatures.c
+
43
−
33
View file @
ba752234
...
@@ -26,9 +26,9 @@
...
@@ -26,9 +26,9 @@
*
*
* Exported functions:
* Exported functions:
* HISTORY:
* HISTORY:
* Last edited: Jun 1
0
1
4:51
2009 (rds)
* Last edited: Jun 1
1
1
5:07
2009 (rds)
* Created: Thu Jul 29 10:45:00 2004 (rnc)
* Created: Thu Jul 29 10:45:00 2004 (rnc)
* CVS info: $Id: zmapWindowDrawFeatures.c,v 1.24
6
2009-06-1
0
14:
01:24
rds Exp $
* CVS info: $Id: zmapWindowDrawFeatures.c,v 1.24
7
2009-06-1
1
14:
13:59
rds Exp $
*-------------------------------------------------------------------
*-------------------------------------------------------------------
*/
*/
...
@@ -596,8 +596,8 @@ void zmapWindowDrawFeatureSet(ZMapWindow window,
...
@@ -596,8 +596,8 @@ void zmapWindowDrawFeatureSet(ZMapWindow window,
FooCanvasGroup
*
reverse_col_wcp
,
FooCanvasGroup
*
reverse_col_wcp
,
ZMapFrame
frame
)
ZMapFrame
frame
)
{
{
ZMapWindowContainerGroup
forward_container
;
ZMapWindowContainerGroup
forward_container
=
NULL
;
ZMapWindowContainerGroup
reverse_container
;
ZMapWindowContainerGroup
reverse_container
=
NULL
;
CreateFeatureSetDataStruct
featureset_data
=
{
NULL
}
;
CreateFeatureSetDataStruct
featureset_data
=
{
NULL
}
;
ZMapFeatureSet
view_feature_set
=
NULL
;
ZMapFeatureSet
view_feature_set
=
NULL
;
gboolean
bump_required
=
TRUE
;
gboolean
bump_required
=
TRUE
;
...
@@ -678,7 +678,7 @@ void zmapWindowDrawFeatureSet(ZMapWindow window,
...
@@ -678,7 +678,7 @@ void zmapWindowDrawFeatureSet(ZMapWindow window,
* already loaded in this column a COMPRESS_ALL will bump the whole column
* already loaded in this column a COMPRESS_ALL will bump the whole column
* _not_ just the newly loaded ones... */
* _not_ just the newly loaded ones... */
if
(
forward_co
ntainer
)
if
(
forward_co
l_wcp
)
{
{
if
((
bump_mode
=
zmapWindowContainerFeatureSetGetBumpMode
((
ZMapWindowContainerFeatureSet
)
forward_container
))
!=
ZMAPBUMP_UNBUMP
)
if
((
bump_mode
=
zmapWindowContainerFeatureSetGetBumpMode
((
ZMapWindowContainerFeatureSet
)
forward_container
))
!=
ZMAPBUMP_UNBUMP
)
zmapWindowColumnBumpRange
(
FOO_CANVAS_ITEM
(
forward_col_wcp
),
bump_mode
,
ZMAPWINDOW_COMPRESS_ALL
)
;
zmapWindowColumnBumpRange
(
FOO_CANVAS_ITEM
(
forward_col_wcp
),
bump_mode
,
ZMAPWINDOW_COMPRESS_ALL
)
;
...
@@ -688,7 +688,7 @@ void zmapWindowDrawFeatureSet(ZMapWindow window,
...
@@ -688,7 +688,7 @@ void zmapWindowDrawFeatureSet(ZMapWindow window,
zmapWindowColumnSetState
(
window
,
forward_col_wcp
,
ZMAPSTYLE_COLDISPLAY_INVALID
,
FALSE
)
;
zmapWindowColumnSetState
(
window
,
forward_col_wcp
,
ZMAPSTYLE_COLDISPLAY_INVALID
,
FALSE
)
;
}
}
if
(
reverse_co
ntainer
)
if
(
reverse_co
l_wcp
)
{
{
if
((
bump_mode
=
zmapWindowContainerFeatureSetGetBumpMode
((
ZMapWindowContainerFeatureSet
)
reverse_container
))
!=
ZMAPBUMP_UNBUMP
)
if
((
bump_mode
=
zmapWindowContainerFeatureSetGetBumpMode
((
ZMapWindowContainerFeatureSet
)
reverse_container
))
!=
ZMAPBUMP_UNBUMP
)
zmapWindowColumnBumpRange
(
FOO_CANVAS_ITEM
(
reverse_col_wcp
),
bump_mode
,
ZMAPWINDOW_COMPRESS_ALL
)
;
zmapWindowColumnBumpRange
(
FOO_CANVAS_ITEM
(
reverse_col_wcp
),
bump_mode
,
ZMAPWINDOW_COMPRESS_ALL
)
;
...
@@ -893,7 +893,6 @@ void zmapWindowDraw3FrameFeatures(ZMapWindow window)
...
@@ -893,7 +893,6 @@ void zmapWindowDraw3FrameFeatures(ZMapWindow window)
{
{
ZMapCanvasDataStruct
canvas_data
=
{
NULL
};
ZMapCanvasDataStruct
canvas_data
=
{
NULL
};
ZMapFeatureContext
full_context
;
ZMapFeatureContext
full_context
;
FooCanvasItem
*
root_group_item
=
NULL
;
full_context
=
window
->
feature_context
;
full_context
=
window
->
feature_context
;
...
@@ -904,9 +903,6 @@ void zmapWindowDraw3FrameFeatures(ZMapWindow window)
...
@@ -904,9 +903,6 @@ void zmapWindowDraw3FrameFeatures(ZMapWindow window)
canvas_data
.
full_context
=
full_context
;
canvas_data
.
full_context
=
full_context
;
canvas_data
.
frame_mode
=
TRUE
;
canvas_data
.
frame_mode
=
TRUE
;
root_group_item
=
zmapWindowFToIFindItemFull
(
window
->
context_to_item
,
0
,
0
,
0
,
ZMAPSTRAND_NONE
,
ZMAPFRAME_NONE
,
0
);
canvas_data
.
curr_root_group
=
zmapWindowContainerGetFeatures
(
window
->
feature_root_group
)
;
canvas_data
.
curr_root_group
=
zmapWindowContainerGetFeatures
(
window
->
feature_root_group
)
;
...
@@ -949,9 +945,15 @@ static void purge_hide_frame_specific_columns(ZMapWindowContainerGroup container
...
@@ -949,9 +945,15 @@ static void purge_hide_frame_specific_columns(ZMapWindowContainerGroup container
column_strand
=
zmapWindowContainerFeatureSetGetStrand
(
container_set
);
column_strand
=
zmapWindowContainerFeatureSetGetStrand
(
container_set
);
zMapLogMessage
(
"column %s [%s]"
,
g_quark_to_string
(
container_set
->
unique_id
),
zMapFeatureStrand2Str
(
column_strand
));
if
((
column_strand
!=
ZMAPSTRAND_REVERSE
)
||
if
((
column_strand
!=
ZMAPSTRAND_REVERSE
)
||
(
column_strand
==
ZMAPSTRAND_REVERSE
&&
window
->
show_3_frame_reverse
))
(
column_strand
==
ZMAPSTRAND_REVERSE
&&
window
->
show_3_frame_reverse
))
{
{
zMapLogMessage
(
"hiding %s"
,
g_quark_to_string
(
container_set
->
unique_id
));
zmapWindowColumnHide
((
FooCanvasGroup
*
)
container
)
;
zmapWindowColumnHide
((
FooCanvasGroup
*
)
container
)
;
zmapWindowContainerFeatureSetRemoveAllItems
(
container_set
)
;
zmapWindowContainerFeatureSetRemoveAllItems
(
container_set
)
;
...
@@ -1775,6 +1777,8 @@ static FooCanvasGroup *createColumnFull(ZMapWindowContainerFeatures parent_group
...
@@ -1775,6 +1777,8 @@ static FooCanvasGroup *createColumnFull(ZMapWindowContainerFeatures parent_group
/* needs to accept style_list */
/* needs to accept style_list */
zmapWindowContainerFeatureSetAugment
((
ZMapWindowContainerFeatureSet
)
container
,
window
,
zmapWindowContainerFeatureSetAugment
((
ZMapWindowContainerFeatureSet
)
container
,
window
,
align
->
unique_id
,
block
->
unique_id
,
feature_set_unique_id
,
0
,
feature_set_unique_id
,
0
,
style_list
,
strand
,
frame
);
style_list
,
strand
,
frame
);
...
@@ -2323,17 +2327,21 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
...
@@ -2323,17 +2327,21 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
ZMapFeatureAny
feature_any
;
ZMapFeatureAny
feature_any
;
gboolean
status
=
FALSE
;
gboolean
status
=
FALSE
;
gboolean
result
=
FALSE
;
/* Always return FALSE ?? check this.... */
gboolean
result
=
FALSE
;
/* Always return FALSE ?? check this.... */
gboolean
log_all
=
FALSE
;
if
(
log_all
)
zMapLogMessage
(
"gobject type = '%s'"
,
G_OBJECT_TYPE_NAME
(
item
));
/* Some items may not have features attached...e.g. empty cols....I should revisit the empty
/* Some items may not have features attached...e.g. empty cols....I should revisit the empty
* cols bit, it keeps causing trouble all over the place.....column creation would be so much
* cols bit, it keeps causing trouble all over the place.....column creation would be so much
* simpler without it.... */
* simpler without it.... */
if
((
ZMAP_IS_CONTAINER_GROUP
(
item
)
==
TRUE
)
&&
if
((
ZMAP_IS_CONTAINER_GROUP
(
item
)
==
TRUE
)
&&
(
container
=
ZMAP_CONTAINER_GROUP
(
item
))
&&
(
container
=
ZMAP_CONTAINER_GROUP
(
item
)))
(
feature_any
=
container
->
feature_any
))
{
{
context_to_item
=
window
->
context_to_item
;
context_to_item
=
window
->
context_to_item
;
feature_any
=
container
->
feature_any
;
switch
(
container
->
level
)
switch
(
container
->
level
)
{
{
case
ZMAPCONTAINER_LEVEL_ROOT
:
case
ZMAPCONTAINER_LEVEL_ROOT
:
...
@@ -2341,7 +2349,7 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
...
@@ -2341,7 +2349,7 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
zMapAssert
(
feature_any
->
struct_type
==
ZMAPFEATURE_STRUCT_CONTEXT
);
zMapAssert
(
feature_any
->
struct_type
==
ZMAPFEATURE_STRUCT_CONTEXT
);
status
=
zmapWindowFToIRemoveRoot
(
context_to_item
)
;
status
=
zmapWindowFToIRemoveRoot
(
context_to_item
)
;
break
;
break
;
}
}
case
ZMAPCONTAINER_LEVEL_ALIGN
:
case
ZMAPCONTAINER_LEVEL_ALIGN
:
...
@@ -2361,18 +2369,31 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
...
@@ -2361,18 +2369,31 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
feature_any
->
parent
->
unique_id
,
feature_any
->
parent
->
unique_id
,
feature_any
->
unique_id
)
;
feature_any
->
unique_id
)
;
break
;
}
}
break
;
case
ZMAPCONTAINER_LEVEL_FEATURESET
:
case
ZMAPCONTAINER_LEVEL_FEATURESET
:
{
{
zMapAssert
(
feature_any
->
struct_type
==
ZMAPFEATURE_STRUCT_FEATURESET
);
container_set
=
(
ZMapWindowContainerFeatureSet
)
container
;
zMapAssert
(
feature_any
->
parent
);
zMapAssert
(
feature_any
->
parent
->
parent
);
if
(
feature_any
)
{
zMapAssert
(
feature_any
->
struct_type
==
ZMAPFEATURE_STRUCT_FEATURESET
);
zMapAssert
(
feature_any
->
parent
);
zMapAssert
(
feature_any
->
parent
->
parent
);
zMapAssert
(
feature_any
->
unique_id
==
container_set
->
unique_id
);
}
status
=
zmapWindowFToIRemoveSet
(
context_to_item
,
container_set
->
align_id
,
container_set
->
block_id
,
container_set
->
unique_id
,
container_set
->
strand
,
container_set
->
frame
)
;
/* If the focus column goes then so should the focus items as they should be in step. */
/* If the focus column goes then so should the focus items as they should be in step. */
if
(
zmapWindowFocusGetHotColumn
(
window
->
focus
)
==
group
)
if
(
zmapWindowFocusGetHotColumn
(
window
->
focus
)
==
group
)
zmapWindowFocusReset
(
window
->
focus
)
;
zmapWindowFocusReset
(
window
->
focus
)
;
/* get rid of the overlay manager */
/* get rid of the overlay manager */
if
((
overlay_manager
=
g_object_get_data
(
G_OBJECT
(
group
),
ITEM_FEATURE_OVERLAY_DATA
)))
if
((
overlay_manager
=
g_object_get_data
(
G_OBJECT
(
group
),
ITEM_FEATURE_OVERLAY_DATA
)))
{
{
...
@@ -2380,31 +2401,20 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
...
@@ -2380,31 +2401,20 @@ static gboolean containerDestroyCB(FooCanvasItem *item, gpointer user_data)
zmapWindowFocusRemoveOverlayManager
(
window
->
focus
,
overlay_manager
);
zmapWindowFocusRemoveOverlayManager
(
window
->
focus
,
overlay_manager
);
overlay_manager
=
zmapWindowOverlayDestroy
(
overlay_manager
);
overlay_manager
=
zmapWindowOverlayDestroy
(
overlay_manager
);
}
}
container_set
=
(
ZMapWindowContainerFeatureSet
)
item
;
status
=
zmapWindowFToIRemoveSet
(
context_to_item
,
feature_any
->
parent
->
parent
->
unique_id
,
feature_any
->
parent
->
unique_id
,
feature_any
->
unique_id
,
container_set
->
strand
,
container_set
->
frame
)
;
break
;
}
}
break
;
default:
default:
{
{
zMapAssertNotReached
()
;
zMapAssertNotReached
()
;
}
}
}
}
#ifdef RDS_DEBUG_ITEM_IN_HASH_DESTROY
if
(
!
status
)
if
(
!
status
)
printf
(
"containerDestroyCB (%p): remove failed
\n
"
,
group
);
zMapLogCritical
(
"containerDestroyCB (%p): remove failed"
,
group
);
#endif
/* RDS_DEBUG_ITEM_IN_HASH_DESTROY */
}
}
else
else
{
{
zMapLogCritical
(
"containerDestroyCB (%p): no Feature Data
\n
"
,
group
);
zMapLogCritical
(
"containerDestroyCB (%p): no Feature Data"
,
group
);
}
}
#ifdef RDS_REMOVED
#ifdef RDS_REMOVED
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment