mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Allow clicking mouse back button on stacked panel widgets
Only works if click occurs outside of widgets - we probably should start ignoring clicks which aren't left/middle/right in any mouse event handlers
This commit is contained in:
parent
7aff3e784c
commit
e5f581405e
@ -89,4 +89,9 @@ class QgsPanelWidgetStack: public QWidget
|
||||
* @param panel The panel to close.
|
||||
*/
|
||||
void closePanel( QgsPanelWidget* panel );
|
||||
|
||||
protected:
|
||||
|
||||
void mouseReleaseEvent( QMouseEvent *e );
|
||||
|
||||
};
|
||||
|
@ -147,6 +147,14 @@ void QgsPanelWidgetStack::closePanel( QgsPanelWidget *panel )
|
||||
this->updateBreadcrumb();
|
||||
}
|
||||
|
||||
void QgsPanelWidgetStack::mouseReleaseEvent( QMouseEvent *e )
|
||||
{
|
||||
if ( e->button() == Qt::BackButton )
|
||||
{
|
||||
acceptCurrentPanel();
|
||||
}
|
||||
}
|
||||
|
||||
void QgsPanelWidgetStack::updateBreadcrumb()
|
||||
{
|
||||
QString breadcrumb;
|
||||
|
@ -117,6 +117,11 @@ class GUI_EXPORT QgsPanelWidgetStack : public QWidget, private Ui::QgsRendererWi
|
||||
* @param panel The panel to close.
|
||||
*/
|
||||
void closePanel( QgsPanelWidget *panel );
|
||||
|
||||
protected:
|
||||
|
||||
void mouseReleaseEvent( QMouseEvent *e ) override;
|
||||
|
||||
private:
|
||||
void updateBreadcrumb();
|
||||
QStack<QString> mTitles;
|
||||
|
Loading…
x
Reference in New Issue
Block a user