Single-click selection of product.

It was clumsy to first select the product and then click the select
button.
This commit is contained in:
Jim Evins
2016-03-31 22:06:05 -04:00
parent c2aef0b738
commit 9f6697376d
3 changed files with 21 additions and 39 deletions
+12 -12
View File
@@ -106,18 +106,8 @@ void SelectProductDialog::onPageSizeCheckClicked()
///
void SelectProductDialog::onTemplatePickerSelectionChanged()
{
const glabels::Template *tmplate = templatePicker->selectedTemplate();
selectButton->setEnabled( tmplate != NULL );
}
///
/// Select Button Clicked Slot
///
void SelectProductDialog::onSelectButtonClicked()
{
close();
// Delay close. This should make the selection more apparent to the user.
mTimer.start( 125, this );
}
@@ -129,3 +119,13 @@ void SelectProductDialog::onCancelButtonClicked()
mCanceled = true;
close();
}
///
/// Cancel Button Clicked Slot
///
void SelectProductDialog::timerEvent( QTimerEvent *event )
{
mTimer.stop();
close();
}