File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1058,6 +1058,9 @@ def __init__(self, parent=None):
10581058 self .setDragMode (QtWidgets .QGraphicsView .DragMode .ScrollHandDrag )
10591059 self .factor = 1.2
10601060
1061+ self .setViewport (QtWidgets .QOpenGLWidget ())
1062+ self .setRenderHint (QtGui .QPainter .Antialiasing , False )
1063+
10611064 def wheelEvent (self , event : QtGui .QWheelEvent ):
10621065 angel = event .angleDelta ()
10631066 angelX , angelY = angel .x (), angel .y ()
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ def set_select(self, row):
5858
5959 def listwidget_doubleclick (self ):
6060 row = self .listWidget .currentRow ()
61- self .mainwindow .current_index = row
6261 self .mainwindow .show_image (row )
6362
6463 def dragEnterEvent (self , event ):
Original file line number Diff line number Diff line change @@ -1112,24 +1112,22 @@ def prev_image(self):
11121112 return
11131113 if self .current_index is None :
11141114 return
1115- self .current_index = self .current_index - 1
1116- if self .current_index < 0 :
1117- self .current_index = 0
1115+ current_index = self .current_index - 1
1116+ if current_index < 0 :
11181117 QtWidgets .QMessageBox .warning (self , 'Warning' , 'This is the first picture.' )
11191118 else :
1120- self .show_image (self . current_index )
1119+ self .show_image (current_index )
11211120
11221121 def next_image (self ):
11231122 if self .scene .mode != STATUSMode .VIEW :
11241123 return
11251124 if self .current_index is None :
11261125 return
1127- self .current_index = self .current_index + 1
1128- if self .current_index > len (self .files_list ) - 1 :
1129- self .current_index = len (self .files_list )- 1
1126+ current_index = self .current_index + 1
1127+ if current_index > len (self .files_list ) - 1 :
11301128 QtWidgets .QMessageBox .warning (self , 'Warning' , 'This is the last picture.' )
11311129 else :
1132- self .show_image (self . current_index )
1130+ self .show_image (current_index )
11331131
11341132 def jump_to (self ):
11351133 index = self .files_dock_widget .lineEdit_jump .text ()
You can’t perform that action at this time.
0 commit comments