docs: def on_widget__button_release_event(self, widget, event):
          '''
          Called when any mouse button is released.
  
  
          .. versionchanged:: 0.11.3
              Always reset pending route, regardless of whether a route was
              completed.  This includes a) removing temporary routes from routes
              table, and b) resetting the state of the current route electrode
              queue.  This fixes
              https://github.com/sci-bots/microdrop/issues/256.
          '''
          event = event.copy()
          if self.mode == 'register_video' and (event.button == 1 and
                                                self.start_event is not None):
              self.emit('point-pair-selected', {'start_event': self.start_event,
                                                'end_event': event.copy()})
              self.start_event = None
              return
          elif self.mode == 'control':
              # XXX Negative `route_i` corresponds to temporary route being
              # drawn.  Since release of mouse button terminates route drawing,
              # clear any rows corresponding to negative `route_i` values from
              # the routes table.
              self.df_routes = self.df_routes.loc[self.df_routes.route_i >=
                                                  0].copy()
              shape = self.canvas.find_shape(event.x, event.y)
  
              if shape is not None:
                  electrode_data = {'electrode_id': shape, 'event': event.copy()}
                  if event.button == 1:
                      if gtk.gdk.BUTTON1_MASK == event.get_state():
                          if self._route.append(shape):
                              self.emit('route-electrode-added', shape)
                          if len(self._route.electrode_ids) == 1:
                              # Single electrode, so select electrode.
                              self.emit('electrode-selected', electrode_data)
                          else:
                              # Multiple electrodes, so select route.
                              route = self._route
                              self.emit('route-selected', route)
                      elif (event.get_state() == (gtk.gdk.MOD1_MASK |
                                                  gtk.gdk.BUTTON1_MASK) and
                          self.last_pressed != shape):
                          # `<Alt>` key was held down.
                          self.emit('electrode-pair-selected',
                                  {'source_id': self.last_pressed,
                                   'target_id': shape, 'event': event.copy()})
                      self.last_pressed = None
                  elif event.button == 3:
                      # Create right-click pop-up menu.
                      menu = self.create_context_menu(event, shape)
  
                      # Display menu popup
                      menu.popup(None, None, None, event.button, event.time)
              # Clear route.
              self._route = None