Skip to content

Commit

Permalink
forgot to check these minor fixes in
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnie committed Mar 10, 2024
1 parent 9ebc64d commit d6f5e76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions stitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,14 @@ def on_flag_manual_review(self):
def on_remove_selected(self):
self.schema.set_undo_checkpoint()
(layer, _tile) = self.schema.get_tile_by_coordinate(self.selected_image_centroid)
# deselect the selected layer
self.selected_image_centroid = None
self.selected_layer = None
# clear all the layers from the layer display
while self.status_layer_select_layout.count():
child = self.status_layer_select_layout.takeAt(0)
if child.widget():
child.widget().deleteLater()
self.schema.remove_tile(layer)
self.redraw_overview()
if self.zoom_window_opened:
Expand Down
4 changes: 2 additions & 2 deletions template_stitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ def stitch_auto_template_linear(self, stitch_list=None, mse_cleanup=False):
self.schema.set_undo_checkpoint()
for y in y_list[1:]: # y_list[1:] because top-left anchor
(moving_layer, moving_t) = self.schema.get_tile_by_coordinate(Point(x, y))
if moving_t['auto_error'] == 'invalid' or moving_t['auto_error'] == 'true':
if moving_t is not None and (moving_t['auto_error'] == 'invalid' or moving_t['auto_error'] == 'true'):
restart, abort = self.stitch_one_template(
self.schema,
[ref_layer],
Expand All @@ -1195,7 +1195,7 @@ def stitch_auto_template_linear(self, stitch_list=None, mse_cleanup=False):
self.schema.set_undo_checkpoint()
for x in x_list[1:]: # x_list[1:] because top-left anchor
(moving_layer, moving_t) = self.schema.get_tile_by_coordinate(Point(x, y))
if moving_t['auto_error'] == 'invalid' or moving_t['auto_error'] == 'true':
if moving_t is not None and (moving_t['auto_error'] == 'invalid' or moving_t['auto_error'] == 'true'):
restart, abort = self.stitch_one_template(
self.schema,
[ref_layer],
Expand Down

0 comments on commit d6f5e76

Please sign in to comment.