Delete pages from a pdfarranger instance after they have been moved to another instance.
(self, _widget, _context)
| 2278 | context.finish(True, True, etime) |
| 2279 | |
| 2280 | def iv_dnd_data_delete(self, _widget, _context): |
| 2281 | """Delete pages from a pdfarranger instance after they have |
| 2282 | been moved to another instance.""" |
| 2283 | if self.target_is_intern and os.name == 'nt': |
| 2284 | # Workaround for windows |
| 2285 | # On Windows this method is in some situations triggered even for drag & drop |
| 2286 | # within the same pdfarranger instance |
| 2287 | return |
| 2288 | selection = self.iconview.get_selected_items() |
| 2289 | self.undomanager.commit("Move") |
| 2290 | self.set_unsaved(True) |
| 2291 | model = self.iconview.get_model() |
| 2292 | ref_del_list = [Gtk.TreeRowReference.new(model, path) for path in selection] |
| 2293 | with self.render_lock(): |
| 2294 | for ref_del in ref_del_list: |
| 2295 | path = ref_del.get_path() |
| 2296 | model.remove(model.get_iter(path)) |
| 2297 | self.iv_selection_changed() |
| 2298 | self.update_iconview_geometry() |
| 2299 | GObject.idle_add(self.render) |
| 2300 | malloc_trim() |
| 2301 | |
| 2302 | def iv_dnd_motion(self, iconview, context, x, y, etime): |
| 2303 | """Handles drag motion: autoscroll, select move or copy, select drag cursor location.""" |
nothing calls this directly
no test coverage detected