Skip to content

Commit 658d896

Browse files
committed
- v1.2.7
1 parent c3a2911 commit 658d896

File tree

4 files changed

+11
-138
lines changed

4 files changed

+11
-138
lines changed

CHANGELOG.md

Lines changed: 0 additions & 130 deletions
This file was deleted.

ISAT/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# @Author : LG
33

44
__author__ = 'yatengLG'
5-
__version__ = '1.2.6'
5+
__version__ = '1.2.7'

ISAT/widgets/mainwindow.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,14 +1365,18 @@ def about(self):
13651365

13661366
def screen_shot(self, type='scene'):
13671367
# image_name = "ISAT-{}-{}.png".format(type, datetime.datetime.now().strftime("%Y%m%d%H%M%S"))
1368-
file_path = os.path.join(self.image_root, self.files_list[self.current_index])
1369-
image_name = os.path.basename(file_path)
1370-
image_name = os.path.splitext(image_name)[0] + '.png'
1368+
if self.current_index is not None and self.files_list:
1369+
current_image = self.files_list[self.current_index]
1370+
else:
1371+
current_image = 'no_image.jpg'
1372+
if type == 'scene':
1373+
print('no image saved.')
1374+
return
1375+
image_name = os.path.splitext(current_image)[0] + '.png'
13711376
screen_shot_dir = os.path.join(os.getcwd(), 'screen_shots')
1372-
if not os.path.exists(screen_shot_dir):
1373-
os.makedirs(screen_shot_dir, exist_ok=True)
1377+
os.makedirs(screen_shot_dir, exist_ok=True)
13741378
save_path = os.path.join(screen_shot_dir, image_name)
1375-
print(f'save path: {file_path}')
1379+
print(f'save path: {save_path}')
13761380

13771381
if type == 'scene':
13781382
try:

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
include ISAT/checkpoints/mobile_sam.pt
2-
include CHANGELOG.md
32
recursive-include ISAT/segment_any *.py
43
recursive-include ISAT/widgets *
54
recursive-include ISAT/ui *

0 commit comments

Comments
 (0)