mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DRYer
This commit is contained in:
parent
9330217e9b
commit
9a38ad9121
@ -134,7 +134,6 @@ class TrimImage(QDialog):
|
|||||||
if d.exec() == QDialog.DialogCode.Accepted:
|
if d.exec() == QDialog.DialogCode.Accepted:
|
||||||
width, height = d.selection_size
|
width, height = d.selection_size
|
||||||
self.canvas.set_selection_size_in_image_coords(width, height)
|
self.canvas.set_selection_size_in_image_coords(width, height)
|
||||||
self.selection_changed(True)
|
|
||||||
|
|
||||||
def do_trim(self):
|
def do_trim(self):
|
||||||
self.canvas.trim_image()
|
self.canvas.trim_image()
|
||||||
|
@ -590,6 +590,7 @@ class Canvas(QWidget):
|
|||||||
width * self.target.width() / i.width(), height * self.target.height() / i.height())
|
width * self.target.width() / i.width(), height * self.target.height() / i.height())
|
||||||
self.selection_state.current_mode = 'selected'
|
self.selection_state.current_mode = 'selected'
|
||||||
self.update()
|
self.update()
|
||||||
|
self.selection_state_changed.emit(self.has_selection)
|
||||||
|
|
||||||
def mouseMoveEvent(self, ev):
|
def mouseMoveEvent(self, ev):
|
||||||
changed = False
|
changed = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user