Commit 095c9ba8 authored by Erwan Tulou's avatar Erwan Tulou Committed by Jean-Baptiste Kempf

qt4: fix logo selection dialog box not working right away

This patch ensures that, as soon as the user comes back from the filename selection dialog box, the filter is updated accordingly and the expected result (logo insertion or deletion) can be seen right away.
(cherry picked from commit 8fc17f107d6dc63f88cbb6f56279732b0c5d5079)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent ed18e965
......@@ -407,20 +407,30 @@ void ExtVideo::updateFilters()
: groupbox->isChecked() );
}
#define UPDATE_AND_APPLY_TEXT( widget, file ) \
CONNECT( ui.widget, textChanged( const QString& ), \
this, updateFilterOptions() ); \
ui.widget->setText( toNativeSeparators( file ) ); \
ui.widget->disconnect( SIGNAL( textChanged( const QString& ) ) );
void ExtVideo::browseLogo()
{
QString file = QFileDialog::getOpenFileName( NULL, qtr( "Logo filenames" ),
p_intf->p_sys->filepath, "Images (*.png *.jpg);;All (*)" );
ui.logoFileText->setText( toNativeSeparators( file ) );
UPDATE_AND_APPLY_TEXT( logoFileText, file );
}
void ExtVideo::browseEraseFile()
{
QString file = QFileDialog::getOpenFileName( NULL, qtr( "Image mask" ),
p_intf->p_sys->filepath, "Images (*.png *.jpg);;All (*)" );
ui.eraseMaskText->setText( toNativeSeparators( file ) );
UPDATE_AND_APPLY_TEXT( eraseMaskText, file );
}
#undef UPDATE_AND_APPLY_TEXT
void ExtVideo::initComboBoxItems( QObject *widget )
{
QComboBox *combobox = qobject_cast<QComboBox*>( widget );
......
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