Tools deselection possible

Bug #602653 reported by thecursedfly on 2010-07-07
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pinta
Low
Unassigned

Bug Description

Actual bug: It's possible to deselect a tool and still continue to use it.

How it should be: There should always be one selected tool and it shouldn't be possible to deselect them clicking on their icon.

Jonathan Pobst (jpobst) on 2010-11-28
Changed in pinta:
importance: Undecided → Low
status: New → Confirmed
Khairuddin Ni'am (niam-nfinity) wrote :

ToolManager.cs,
this code (on HandlePbToolItemClicked method) :
// Don't let the user unselect the current tool
if (t.Name == CurrentTool.Name) {
 tb.Active = true;
 return;
}
doesn't work as intended, because the odd behaviour when we set ToolItem.Active property.

on SetCurrentTool method :
// Load new tool
index = i;
tool.ToolItem.Active = true; // this code will also invoke Clicked event handler
tool.ToolItem.Active = true; // duplicate code to show the odd. this code doesn't invoke Clicked event handler
tool.DoActivated ();
tool.DoBuildToolBar (PintaCore.Chrome.ToolToolBar);

Maybe it's GTK# bug ?

Khairuddin Ni'am (niam-nfinity) wrote :

Update for my previous comment.

When we set Active property to a new value, and that new value is not the same with current Active property, it will also invoke Clicked event handler.

Khairuddin Ni'am (niam-nfinity) wrote :

bug fix

Khairuddin Ni'am (niam-nfinity) wrote :

Accidentally delete my patch. Sorry, still new to this.

Jonathan Pobst (jpobst) wrote :

Patch committed in https://github.com/jpobst/Pinta/commit/0ac98a0b27cabcc1685d2a177c67dfdc9cf3e819.

Thanks for the report and the patch!

Changed in pinta:
milestone: none → 0.6
status: Confirmed → Fix Committed
grofaty (grofaty) wrote :

I have installed Pinta 0.7 on Windows XP and I can confirm problem is fixed. Maybe this was already fixed in 0.6, but I haven't checked in 0.6 version.

Changed in pinta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers