sistemata funzione copy all and refresh, aggiunta icona
This commit is contained in:
parent
cf1db0db60
commit
3720d3c755
BIN
CodeBridge.ico
BIN
CodeBridge.ico
Binary file not shown.
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 15 KiB |
@ -554,9 +554,15 @@ class DiffViewer(tk.Toplevel):
|
||||
dst_text = self.left_text if dst == 'left' else self.right_text
|
||||
if not messagebox.askyesno('Confirm copy all', f'Copy entire content from {src} to {dst}?', parent=self):
|
||||
return
|
||||
content = src_text.get('1.0', 'end')
|
||||
# use end-1c to avoid the Text widget's extra trailing newline
|
||||
content = src_text.get('1.0', 'end-1c')
|
||||
dst_text.delete('1.0', 'end')
|
||||
# if content is empty, ensure destination becomes empty (no extra newline)
|
||||
if content:
|
||||
dst_text.insert('1.0', content)
|
||||
else:
|
||||
# keep widget empty
|
||||
pass
|
||||
self._mark_dirty(dst)
|
||||
self._refresh_diff()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user