File tree 1 file changed +5
-6
lines changed
image_in_window_screensaver
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -90,20 +90,19 @@ def image_previous(self):
90
90
def image_delete (self ):
91
91
l .log ("delete: " + self ._all_images [self ._current_index ])
92
92
send2trash (self ._all_images [self ._current_index ])
93
- # self._all_images: List = file_walker.walk(sys.argv[1])
94
- self ._all_images : List = file_walker .walk (file_walker .get_mode ())
93
+ self ._all_images .remove (self ._all_images [self ._current_index ])
95
94
self ._set_image (self ._current_index )
96
- # self.image_shuffle()
97
95
98
96
def _set_image (self , index ):
99
- if index > len (self ._all_images )- 1 :
97
+ if index > len (self ._all_images )- 1 or index < - 1 * len ( self . _all_images ) :
100
98
l .log ("error: shuffling again" )
101
99
index = 0
100
+ self ._current_index = index
102
101
l .log ("setting image" )
103
- image_pix_map = QPixmap (self ._all_images [index ])
102
+ image_pix_map = QPixmap (self ._all_images [self . _current_index ])
104
103
print ("image: " , image_pix_map .width (), image_pix_map .height ())
105
104
self ._image_label .setPixmap (image_pix_map )
106
- self .set_title (self ._all_images [index ])
105
+ self .set_title (self ._all_images [self . _current_index ])
107
106
108
107
# def set_line_edit(self, edit_line: QLineEdit):
109
108
# self._line_edit = edit_line
You can’t perform that action at this time.
0 commit comments