@@ -3990,6 +3990,20 @@ def start(self):
3990
3990
new_tag_action .setToolTip ('Ctrl+T' )
3991
3991
edit_menu .addAction (new_tag_action )
3992
3992
3993
+ edit_menu .addSeparator ()
3994
+
3995
+ copy_entry_fields_action = QAction ('&Copy' , menu_bar )
3996
+ copy_entry_fields_action .triggered .connect (lambda : self .copy_entry_fields_action_callback ())
3997
+ copy_entry_fields_action .setShortcut (QtCore .QKeyCombination (QtCore .Qt .KeyboardModifier (QtCore .Qt .KeyboardModifier .ControlModifier ), QtCore .Qt .Key .Key_C ))
3998
+ copy_entry_fields_action .setToolTip ('Ctrl+C' )
3999
+ edit_menu .addAction (copy_entry_fields_action )
4000
+
4001
+ paste_entry_fields_action = QAction ('&Paste' , menu_bar )
4002
+ paste_entry_fields_action .triggered .connect (lambda : self .paste_entry_fields_action_callback ())
4003
+ paste_entry_fields_action .setShortcut (QtCore .QKeyCombination (QtCore .Qt .KeyboardModifier (QtCore .Qt .KeyboardModifier .ControlModifier ), QtCore .Qt .Key .Key_V ))
4004
+ paste_entry_fields_action .setToolTip ('Ctrl+V' )
4005
+ edit_menu .addAction (paste_entry_fields_action )
4006
+
3993
4007
edit_menu .addSeparator ()
3994
4008
3995
4009
manage_file_extensions_action = QAction ('Ignore File Extensions' , menu_bar )
@@ -4357,6 +4371,21 @@ def run_macro(self, name: str, entry_id: int):
4357
4371
self .lib .get_field_attr (field , 'content' )),
4358
4372
mode = 'replace' )
4359
4373
4374
+ def copy_entry_fields_action_callback (self ):
4375
+ for item in self .selected .__reversed__ ():
4376
+ if item [0 ] == ItemType .ENTRY :
4377
+ entry = self .lib .get_entry (item [1 ])
4378
+ self .copied_fields = entry .fields .copy ()
4379
+
4380
+ def paste_entry_fields_action_callback (self ):
4381
+ if self .copied_fields != None :
4382
+ for item in self .selected :
4383
+ if item [0 ] == ItemType .ENTRY :
4384
+ entry = self .lib .get_entry (item [1 ])
4385
+ entry .fields = self .copied_fields .copy ()
4386
+ self .preview_panel .update_widgets ()
4387
+
4388
+
4360
4389
def mouse_navigation (self , event : QMouseEvent ):
4361
4390
# print(event.button())
4362
4391
if event .button () == Qt .MouseButton .ForwardButton :
0 commit comments