Skip to content

Commit

Permalink
Remove line of code from loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdallah Mohammed committed May 25, 2021
1 parent 28650d5 commit f5641a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Lib/Canvas.vala
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public class Akira.Lib.Canvas : Goo.Canvas {
) {
// Loop through the list of the dragged files.
int index = 0;
window.event_bus.insert_item ("image");
foreach (string link in data.get_uris ()) {
var file_link = link.replace ("file://", "").replace ("file:/", "");
file_link = Uri.unescape_string (file_link);
Expand All @@ -108,7 +109,7 @@ public class Akira.Lib.Canvas : Goo.Canvas {
// Create the image manager.
var manager = new Lib.Managers.ImageManager (image, index);
// Let the app know that we're adding image items.
window.event_bus.insert_item ("image");

// Create the item.
var item = window.items_manager.insert_item (x, y, manager);
// Force the resize of the item to its original size.
Expand Down

0 comments on commit f5641a6

Please sign in to comment.