Permalink
Browse files

remove extraneous flush events

  • Loading branch information...
1 parent 3dda756 commit f9931eedb1c7a3f8807ccd11f98dbce66b00baf3 @lstein lstein committed Aug 30, 2011
View
3 cgi-bin/gbrowse_img
@@ -122,6 +122,9 @@ sub run {
$render->add_user_tracks($render->data_source);
$render->update_state();
+ # notice that there is no explicit flush() of the session/state, and therefore the
+ # changes to the session are not stored.
+
warn join ' ',$render->potential_tracks if DEBUG;
# self-documentation feature: dump out tab-delimited list of mnemonics and keys
View
7 lib/Bio/Graphics/Browser2/Render.pm
@@ -216,7 +216,8 @@ sub destroy {
$lm->destroy;
delete $self->{login_manager};
}
- $self->session->flush if $self->session;
+ $self->session->unlock if $self->session;
+# $self->session->flush if $self->session;
}
###################################################################################
@@ -1866,7 +1867,7 @@ sub update_state {
my $self = shift;
warn "[$$] update_state()" if DEBUG;
return if param('gbgff'); # don't let gbgff requests update our coordinates!!!
- return if url() =~ /gbrowse_img/; # don't let gbrowse_img requests update our coordinates either!!
+# return if url() =~ /gbrowse_img/; # don't let gbrowse_img requests update our coordinates either!!
$self->_update_state;
}
@@ -2808,8 +2809,6 @@ sub asynchronous_update_coordinates {
# update our "name" state and the CGI parameter
$state->{name} = $self->region_string;
}
-
- $self->session->flush();
$position_updated;
}
View
11 lib/Bio/Graphics/Browser2/Render/HTML.pm
@@ -184,7 +184,7 @@ sub render_navbar {
my $search = $self->setting('no search')
? '' : b($self->translate('Landmark')).':'.br().$searchform.$self->examples();
- my $plugin_form = div({-id=>'plugin_form', -style=>'width:380px;float:left;'},$self->plugin_form());
+ my $plugin_form = div({-id=>'plugin_form'},$self->plugin_form());
# *** Checks the state to see if a snapshot is active and assigns it ***
#my $isSnapshotActive = $settings->{snapshot_active};
@@ -195,16 +195,15 @@ sub render_navbar {
my $sliderform = div({-id=>'slider_form'},$self->sliderform($segment));
# *** Creates the save session button and assigns it to save_prompt ***
- my $saveSessionButton = div({-id=>'unsessionbutton', -style=>"width: 100px; position: relative; float:left;"},$self->render_select_saveSession());
- my $restoreSessionButton = div({-id=>'loadbutton', -style=>"width: 100px; position:relative;float:right;"},$self->render_select_loadSession());
+ my $saveSessionButton = span({-id=>'unsessionbutton'},$self->render_select_saveSession());
+ my $restoreSessionButton = span({-id=>'loadbutton'},$self->render_select_loadSession());
my $saveSessionStyle = "position:fixed;left;width:184px;height:50px;background:whitesmoke;z-index:1; border:2px solid gray;display:none; padding: 5px;";
my $save_prompt = div({-id => 'save_snapshot',-style=>"$saveSessionStyle"},
$snapshot_form,
input({ -type => "button",
-name => "Save",
-value => "Save",
- -onclick => '$(\'save_snapshot\').hide(); this.style.zIndex = \'0\'; Controller.saveSnapshot();',
- -style => 'margin-left:35px;',}),
+ -onclick => '$(\'save_snapshot\').hide(); this.style.zIndex = \'0\'; Controller.saveSnapshot();'}),
input({ -type => "button",
-name => "Cancel",
-value => "Cancel",
@@ -217,7 +216,7 @@ sub render_navbar {
return $self->toggle('Search',
div({-class=>'searchbody'},
table({-border=>0,-width=>'95%'},
- TR(td({-width=>'50%'},$search),td({-width=>'45%'},$plugin_form . $snapshot_options)),
+ TR(td({-width=>'50%'},$search),td({-width=>'45%'},$plugin_form,$snapshot_options)),
TR(td({-align=>'left'},
$source_form,
),
View
2 lib/Bio/Graphics/Browser2/Session.pm
@@ -245,7 +245,7 @@ sub delete {
sub flush {
my $self = shift;
return unless $$ == $self->{pid};
- carp "[$$] session flush" if DEBUG;
+ carp "[$$] session flush";# if DEBUG;
$self->{session}->flush if $self->{session};
$self->unlock;
warn "[$$] SESSION FLUSH ERROR: ",$self->{session}->errstr

0 comments on commit f9931ee

Please sign in to comment.