Commit 5c9a04ba authored by Claudio Valerio's avatar Claudio Valerio

fixed the search bar bug.

parent 36abfc5c
......@@ -1058,6 +1058,7 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene()
continue;
}
qDebug() << item;
UBGraphicsCache* cache = qgraphicsitem_cast<UBGraphicsCache*>(item);
if(cache && cache->isVisible())
{
......
......@@ -443,11 +443,6 @@ QList<UBLibElement*> UBLibraryController::getContent(UBLibElement *element)
break;
}
// qDebug() << "getContent()";
// qDebug() << this;
// foreach(UBLibElement*eachElement, mElementsList)
// qDebug() << eachElement;
return mElementsList;
}
......
......@@ -110,9 +110,7 @@ void UBPreferencesController::wire()
for(int i = 0; i < settings->supportedKeyboardSizes->size(); i++)
mPreferencesUI->keyboardPaletteKeyButtonSize->addItem(settings->supportedKeyboardSizes->at(i));
// mPreferencesUI->keyboardPaletteKeyButtonSize->addItem("29x29");
// mPreferencesUI->keyboardPaletteKeyButtonSize->addItem("30x30");
// mPreferencesUI->keyboardPaletteKeyButtonSize->addItem("41x41");
connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &)));
......
......@@ -501,6 +501,13 @@ void UBLibActionBar::onNavigbarUpdate(UBLibElement *crntElem)
}
}
void UBLibActionBar::onItemChanged()
{
mSearchBar->setText("");
mpSearchBtn->setEnabled(false);
}
/**
* \brief Construtor
* @param parent as the parent widget
......
......@@ -66,6 +66,7 @@ public slots:
void onSelectionChanged(QList<UBLibElement*> itemList, bool isInTrash);
void onFavoritesEntered(bool bFav);
void onNavigbarUpdate(UBLibElement* crntElem);
void onItemChanged();
protected:
void enterEvent(QEvent *event);
......
......@@ -73,6 +73,9 @@ UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QW
connect(libWidget->actionBar(), SIGNAL(searchElement(QString)), mLibWidget, SLOT(onSearchElement(QString)));
connect(libWidget->actionBar(), SIGNAL(newFolderToCreate()), mLibWidget, SLOT(onNewFolderToCreate()));
connect(mLibWidget, SIGNAL(itemClicked()),libWidget->actionBar(), SLOT(onItemChanged()));
connect(mPathViewer, SIGNAL(mouseClick(UBChainedLibElement*)),libWidget->actionBar(), SLOT(onItemChanged()));
mLibWidget->init();
}
......
......@@ -58,16 +58,16 @@ UBLibPathViewer::UBLibPathViewer(QWidget *parent, const char *name):QGraphicsVie
*/
UBLibPathViewer::~UBLibPathViewer()
{
// if(NULL != mpLayout)
// {
// delete mpLayout;
// mpLayout = NULL;
// }
if(NULL != mpContainer)
{
delete mpContainer;
mpContainer = NULL;
}
//if(NULL != mpLayout)
//{
// delete mpLayout;
// mpLayout = NULL;
//}
if(NULL != mpElems)
{
delete mpElems;
......
......@@ -167,6 +167,7 @@ void UBLibraryWidget::onItemClicked(QGraphicsItem *item, int index)
emit propertiesRequested(pElem);
}
}
emit itemClicked();
}
}
}
......
......@@ -60,6 +60,7 @@ signals:
void itemsSelected(QList<UBLibElement*> elemList, bool inTrash);
void propertiesRequested(UBLibElement* pElem);
void favoritesEntered(bool bFav);
void itemClicked();
protected:
void dragEnterEvent(QDragEnterEvent *event);
......
......@@ -237,16 +237,13 @@ WBTabWidget::WBTabWidget(QWidget *parent)
setDocumentMode(false);
mRecentlyClosedTabsMenu = new QMenu(this);
connect(mRecentlyClosedTabsMenu, SIGNAL(aboutToShow()),
this, SLOT(aboutToShowRecentTabsMenu()));
connect(mRecentlyClosedTabsMenu, SIGNAL(triggered(QAction *)),
this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
connect(mRecentlyClosedTabsMenu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentTabsMenu()));
connect(mRecentlyClosedTabsMenu, SIGNAL(triggered(QAction *)), this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
mRecentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this);
mRecentlyClosedTabsAction->setMenu(mRecentlyClosedTabsMenu);
mRecentlyClosedTabsAction->setEnabled(false);
connect(this, SIGNAL(currentChanged(int)),
this, SLOT(currentChanged(int)));
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
mLineEdits = new QStackedWidget(this);
mLineEdits->setMinimumWidth(200);
......
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