Beispiel #1
0
 def _set_use_data_clipping_max(self, check_state):
     use_clipping = check_state == 2
     if self._current_map:
         if use_clipping and self._get_current_map_config().clipping.use_min:
             self._set_use_clipping(2)
         else:
             new_clipping = self._get_current_map_config().clipping.get_updated(use_max=use_clipping)
             self._controller.apply_action(SetMapClipping(self._current_map, new_clipping))
Beispiel #2
0
 def _set_use_data_clipping_min(self, use_clipping):
     if self._current_map:
         if use_clipping and self._get_current_map_config(
         ).clipping.use_max:
             self._set_use_clipping(True)
         else:
             new_clipping = self._get_current_map_config(
             ).clipping.get_updated(use_min=use_clipping)
             self._controller.apply_action(
                 SetMapClipping(self._current_map, new_clipping))
Beispiel #3
0
 def _update_clipping_max(self, value):
     if self._current_map:
         current_clipping = self._get_current_map_config().clipping
         if current_clipping.use_min and current_clipping.use_max and value < current_clipping.vmin:
             new_clipping = current_clipping.get_updated(vmin=value,
                                                         vmax=value)
         else:
             new_clipping = current_clipping.get_updated(vmax=value)
         self._controller.apply_action(
             SetMapClipping(self._current_map, new_clipping))
Beispiel #4
0
 def _set_use_clipping(self, check_state):
     use_clipping = check_state == 2
     if self._current_map:
         current_clipping = self._get_current_map_config().clipping
         if use_clipping and current_clipping.vmax < current_clipping.vmin:
             new_clipping = current_clipping.get_updated(use_min=use_clipping, use_max=use_clipping,
                                                         vmax=current_clipping.vmin)
         else:
             new_clipping = current_clipping.get_updated(use_min=use_clipping, use_max=use_clipping)
         self._controller.apply_action(SetMapClipping(self._current_map, new_clipping))
     self._update_scaling_delays()
Beispiel #5
0
 def _set_use_clipping(self, use_clipping):
     if self._current_map:
         current_clipping = self._get_current_map_config().clipping
         if use_clipping and current_clipping.vmax < current_clipping.vmin:
             new_clipping = current_clipping.get_updated(
                 use_min=use_clipping,
                 use_max=use_clipping,
                 vmax=current_clipping.vmin)
         else:
             new_clipping = current_clipping.get_updated(
                 use_min=use_clipping, use_max=use_clipping)
         self._controller.apply_action(
             SetMapClipping(self._current_map, new_clipping))
Beispiel #6
0
    def _update_clipping_max(self, value):
        if self._current_map:
            current_clipping = self._get_current_map_config().clipping
            kwargs = dict(vmax=value)

            if current_clipping.use_max and current_clipping.use_min and value < current_clipping.vmin:
                kwargs.update(dict(use_max=False))
                self._auto_enable_scale_max = True
            elif self._auto_enable_scale_max and value > current_clipping.vmin:
                kwargs.update(dict(use_max=True))
                self._auto_enable_scale_max = False

            new_clipping = current_clipping.get_updated(**kwargs)
            self._controller.apply_action(SetMapClipping(self._current_map, new_clipping))