Tools deselection possible

Bug #602653 reported by thecursedfly
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
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.

Tags: icons tools
Jonathan Pobst (jpobst)
Changed in pinta:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
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 ?

Revision history for this message
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.

Revision history for this message
Khairuddin Ni'am (niam-nfinity) wrote :

bug fix

Revision history for this message
Khairuddin Ni'am (niam-nfinity) wrote :

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

Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.