Skip to content
Snippets Groups Projects
Commit 0a112c29 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add dock widgets to the action search bar

parent f3a65b80
No related branches found
No related tags found
No related merge requests found
......@@ -28,10 +28,15 @@ namespace gepetto {
void ActionSearchBar::addAction (QAction* action)
{
actions_[action->text()] = action;
model_->setStringList(
model_->stringList() << action->text()
);
QString t = action->text();
t.remove('&');
if (actions_.contains(t)) {
actions_[t] = action;
} else {
actions_[t] = action;
model_->setStringList( model_->stringList() << t );
qDebug() << t;
}
}
void ActionSearchBar::keyPressEvent ( QKeyEvent* event )
......
......@@ -110,6 +110,7 @@ namespace gepetto {
dock->toggleViewAction ()->setIcon(QIcon::fromTheme("window-new"));
dock->adjustSize();
ui_->menuWindow->addAction(dock->toggleViewAction ());
actionSearchBar_->addAction(dock->toggleViewAction ());
}
void MainWindow::removeDockWidget(QDockWidget *dock)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment