Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix terminal warnings and crosshair cursor after Image File is dragged into the canvas #591

Merged
merged 3 commits into from May 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 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");

Comment on lines 111 to +112
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You moved the method but you forgot the comment.
I'll fix this, but try to be more aware of the code around and the structure you're touching.

// Create the item.
var item = window.items_manager.insert_item (x, y, manager);
// Force the resize of the item to its original size.
Expand All @@ -117,6 +118,7 @@ public class Akira.Lib.Canvas : Goo.Canvas {
}

Gtk.drag_finish (drag_context, true, false, time);
mode_manager.deregister_active_mode ();

update_canvas ();
}
Expand Down