Changing a shortcut

Adam C. nospam at xibo.at
Fri Oct 22 00:07:28 CEST 2010


Wouldn't it be easier to make a single letter shortcut "i" for invert?

It will work now, single key shortcuts should work :)

On Thu, 21 Oct 2010 19:33:15 +0200, Sven Langkamp  
<sven.langkamp at gmail.com> wrote:

> Hi,
>
> I'm trying to solve bug 251616 ( 'Ctrl+I' is ambiguous.) I'm trying to
> change the italics shortcut when the view is created.
>
> Code looks like this:
> Index: kis_view2.cpp
> ===================================================================
> --- kis_view2.cpp       (Revision 1187127)
> +++ kis_view2.cpp       (Arbeitskopie)
> @@ -325,6 +325,13 @@
>      connect(m_d->canvas, SIGNAL(scrollAreaSizeChanged()),  
> m_d->zoomManager,
> SLOT(slotScrollAreaSizeChanged()));
>
>      setAcceptDrops(true);
> +
> +    QAction* selectionInvert = actionCollection()->action("invert");
> +    QAction* textToolItalics =  
> actionCollection()->action("format_italic");
> +    if(selectionInvert && textToolItalics &&  
> selectionInvert->shortcut() ==
> textToolItalics->shortcut()) {
> +        textToolItalics->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_I);
> +        kDebug() << "shortcut is " << textToolItalics->shortcut();
> +    }
>  }
>
> The debug code indicates that the shortcut is changed, but the problem
> persists.
> Any ideas what I have to do?
>
>
> Sven


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the kimageshop mailing list