tool activate()

Adrian Page adrian at pagenet.plus.com
Tue Mar 22 14:34:46 CET 2005


Sven Langkamp wrote:
> On Monday 21 March 2005 14:20, Adrian Page wrote:
> 
>>Sven Langkamp wrote:
>>
>>>By the way: Is there a reason why the optionwidget of the tools is
>>>unpluged twice( once in KisView::setInputDevice and once in
>>>KisView::setCurrentTool)?
>>
>>It's because each input device has its own set of tools with their own
>>settings, but only one can be plugged in the widget at a time. Each time
>>the input device changes, the old one's option widget is removed and
>>replaced with the new one's. This is why it's done in setInputDevice()
>>as well as setCurrentTool().
> 
> But setInputDevice() always calls setCurrentTool(), so unpluging the 
> optionwidget in setCurrentTool would be enough.

But setInputDevice unplugs the widget from the old input device's 
current tool, whereas setCurrentTool unplugs the current input device's 
current tool widget. If it's possible to just unplug whatever widget is 
currently plugged in (can't check that at the moment), you could do it 
just in setCurrentTool.

Adrian


More information about the kimageshop mailing list