mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
don't close popup after first click, so user can select all necessary
options at once
This commit is contained in:
parent
9fbb31a31c
commit
1e3baca361
@ -169,10 +169,11 @@ void QgsCheckableComboBox::toggleItemCheckState( int index )
|
|||||||
|
|
||||||
void QgsCheckableComboBox::hidePopup()
|
void QgsCheckableComboBox::hidePopup()
|
||||||
{
|
{
|
||||||
if ( !view()->underMouse() )
|
if ( !mSkipHide )
|
||||||
{
|
{
|
||||||
QComboBox::hidePopup();
|
QComboBox::hidePopup();
|
||||||
}
|
}
|
||||||
|
mSkipHide = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsCheckableComboBox::showContextMenu( const QPoint &pos )
|
void QgsCheckableComboBox::showContextMenu( const QPoint &pos )
|
||||||
@ -206,7 +207,11 @@ void QgsCheckableComboBox::deselectAllOptions()
|
|||||||
|
|
||||||
bool QgsCheckableComboBox::eventFilter( QObject *object, QEvent *event )
|
bool QgsCheckableComboBox::eventFilter( QObject *object, QEvent *event )
|
||||||
{
|
{
|
||||||
Q_UNUSED( object );
|
if ( ( event->type() == QEvent::MouseButtonPress || event->type() == QEvent::MouseButtonRelease )
|
||||||
|
&& object == view()->viewport() )
|
||||||
|
{
|
||||||
|
mSkipHide = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ( event->type() == QEvent::MouseButtonRelease )
|
if ( event->type() == QEvent::MouseButtonRelease )
|
||||||
{
|
{
|
||||||
|
@ -227,6 +227,8 @@ class GUI_EXPORT QgsCheckableComboBox : public QComboBox
|
|||||||
QString mSeparator;
|
QString mSeparator;
|
||||||
QString mDefaultText;
|
QString mDefaultText;
|
||||||
|
|
||||||
|
bool mSkipHide = false;
|
||||||
|
|
||||||
QMenu *mContextMenu = nullptr;
|
QMenu *mContextMenu = nullptr;
|
||||||
QAction *mSelectAllAction = nullptr;
|
QAction *mSelectAllAction = nullptr;
|
||||||
QAction *mDeselectAllAction = nullptr;
|
QAction *mDeselectAllAction = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user