Commit 96b8cc36 authored by Jan Möbius's avatar Jan Möbius
Browse files

Insert Light action at right position

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9805 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c340ecfe
......@@ -195,7 +195,18 @@ void TypeLightPlugin::pluginsInitialized(){
"Rotate lights using left mouse button."));
connect( lightButton_, SIGNAL( clicked() ), this, SLOT( setLightMode() ) );
viewerToolbar->addWidget( lightButton_ )->setText(tr("Light"));
QList< QAction *> toolbarActions = viewerToolbar->actions();
QAction* pickAction = 0;
for ( int i = 0 ; i < toolbarActions.size() ; ++i ) {
if ( toolbarActions[i]->text() == "Pick" )
pickAction = toolbarActions[i];
}
if (pickAction)
viewerToolbar->insertWidget( pickAction, lightButton_ )->setText(tr("Light"));
else
viewerToolbar->addWidget( lightButton_ )->setText(tr("Light"));
// Create context menu
QActionGroup* group = new QActionGroup(lightButton_);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment