mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-23 00:05:43 -04:00
Fix 'actions' button in attribute table dialog only shows menu after
extended click and hold
This commit is contained in:
parent
9551471ebf
commit
556668e067
@ -187,6 +187,14 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *layer, QgsAttr
|
|||||||
mActionVisibleFilter->setIcon( filterIcon );
|
mActionVisibleFilter->setIcon( filterIcon );
|
||||||
mActionEditedFilter->setIcon( filterIcon );
|
mActionEditedFilter->setIcon( filterIcon );
|
||||||
|
|
||||||
|
mActionFeatureActions = new QToolButton();
|
||||||
|
mActionFeatureActions->setAutoRaise( false );
|
||||||
|
mActionFeatureActions->setPopupMode( QToolButton::InstantPopup );
|
||||||
|
mActionFeatureActions->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mAction.svg" ) ) );
|
||||||
|
mActionFeatureActions->setText( tr( "Actions" ) );
|
||||||
|
mActionFeatureActions->setToolTip( tr( "Actions" ) );
|
||||||
|
mToolbar->addWidget( mActionFeatureActions );
|
||||||
|
|
||||||
// Connect filter signals
|
// Connect filter signals
|
||||||
connect( mActionAdvancedFilter, &QAction::triggered, this, &QgsAttributeTableDialog::filterExpressionBuilder );
|
connect( mActionAdvancedFilter, &QAction::triggered, this, &QgsAttributeTableDialog::filterExpressionBuilder );
|
||||||
connect( mActionShowAllFilter, &QAction::triggered, this, &QgsAttributeTableDialog::filterShowAll );
|
connect( mActionShowAllFilter, &QAction::triggered, this, &QgsAttributeTableDialog::filterShowAll );
|
||||||
|
@ -228,6 +228,7 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QMenu *mMenuActions = nullptr;
|
QMenu *mMenuActions = nullptr;
|
||||||
|
QToolButton *mActionFeatureActions = nullptr;
|
||||||
|
|
||||||
QgsDockWidget *mDock = nullptr;
|
QgsDockWidget *mDock = nullptr;
|
||||||
QgsDistanceArea *myDa = nullptr;
|
QgsDistanceArea *myDa = nullptr;
|
||||||
|
@ -29,6 +29,77 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QgsDualView" name="mMainView">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QFrame" name="mUpdateExpressionBox">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QgsFieldComboBox" name="mFieldCombo"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>=</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QgsFieldExpressionWidget" name="mUpdateExpressionText" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::StrongFocus</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="mRunFieldCalc">
|
||||||
|
<property name="text">
|
||||||
|
<string>Update All</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="mRunFieldCalcSelected">
|
||||||
|
<property name="text">
|
||||||
|
<string>Update Selected</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="8" column="0">
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@ -189,78 +260,6 @@
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="mActionSetStyles"/>
|
<addaction name="mActionSetStyles"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="mActionFeatureActions"/>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QgsDualView" name="mMainView">
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QFrame" name="mUpdateExpressionBox">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QgsFieldComboBox" name="mFieldCombo"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>=</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QgsFieldExpressionWidget" name="mUpdateExpressionText" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::StrongFocus</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="mRunFieldCalc">
|
|
||||||
<property name="text">
|
|
||||||
<string>Update All</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="mRunFieldCalcSelected">
|
|
||||||
<property name="text">
|
|
||||||
<string>Update Selected</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -634,15 +633,6 @@
|
|||||||
<string>Conditional formatting</string>
|
<string>Conditional formatting</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="mActionFeatureActions">
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../images/images.qrc">
|
|
||||||
<normaloff>:/images/themes/default/mAction.svg</normaloff>:/images/themes/default/mAction.svg</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Actions</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
@ -681,6 +671,34 @@
|
|||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../images/images.qrc"/>
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
|
<include location="../../images/images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user