Hide selection information when there is no selection in NewLabelDialog.

This commit is contained in:
Jim Evins
2013-11-16 15:28:02 -05:00
parent 9c68b60194
commit e1ed8587f6
2 changed files with 284 additions and 223 deletions
+5 -2
View File
@@ -45,6 +45,8 @@ namespace gLabels
similarBrowser->setAttribute(Qt::WA_TranslucentBackground);
similarBrowser->viewport()->setAutoFillBackground(false);
selectionStackedWidget->setCurrentIndex( 0 );
connect( searchEntry, SIGNAL(textChanged(const QString &)),
this, SLOT(searchEntryTextChanged(const QString &)) );
@@ -83,11 +85,12 @@ namespace gLabels
if ( selectedItems.isEmpty() )
{
// Clear preview
simplePreview->setTemplate( NULL );
selectionStackedWidget->setCurrentIndex( 0 );
}
else
{
selectionStackedWidget->setCurrentIndex( 1 );
// Set template to preview
TemplatePickerItem *tItem = dynamic_cast<TemplatePickerItem*>(selectedItems.first());
const libglabels::Template *tmplate = tItem->tmplate();