Skip to content

Commit

Permalink
Merge pull request #2763 from nirvn/selection_toolbar_improvement_v3
Browse files Browse the repository at this point in the history
[gui] better toolbar placement for selection actions
  • Loading branch information
nyalldawson committed Feb 6, 2016
2 parents 1ae03be + b625a1d commit f2a05f2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
8 changes: 4 additions & 4 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1843,11 +1843,11 @@ void QgisApp::createToolBars()
QToolButton *bt = new QToolButton( mAttributesToolBar );
bt->setPopupMode( QToolButton::MenuButtonPopup );
QList<QAction*> selectActions;
selectActions << mActionDeselectAll << mActionSelectAll
<< mActionInvertSelection << mActionSelectByExpression;
selectActions << mActionSelectByExpression << mActionSelectAll
<< mActionInvertSelection;
bt->addActions( selectActions );
bt->setDefaultAction( mActionDeselectAll );
QAction* selectionAction = mAttributesToolBar->insertWidget( mActionOpenTable, bt );
bt->setDefaultAction( mActionSelectByExpression );
QAction* selectionAction = mAttributesToolBar->insertWidget( mActionDeselectAll, bt );

// select tool button

Expand Down
1 change: 1 addition & 0 deletions src/ui/qgisapp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@
<bool>true</bool>
</attribute>
<addaction name="mActionIdentify"/>
<addaction name="mActionDeselectAll"/>
<addaction name="mActionOpenTable"/>
<addaction name="mActionOpenFieldCalc"/>
<addaction name="mActionStatisticalSummary"/>
Expand Down
38 changes: 19 additions & 19 deletions src/ui/qgsattributetabledialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,16 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="mRemoveSelectionButton">
<widget class="QToolButton" name="mSelectAllButton">
<property name="toolTip">
<string>Deselect all (Ctrl+Shift+A)</string>
<string>Select all (Ctrl+A)</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionUnselectAttributes.png</normaloff>:/images/themes/default/mActionUnselectAttributes.png</iconset>
<normaloff>:/images/themes/default/mActionSelectAll.png</normaloff>:/images/themes/default/mActionSelectAll.png</iconset>
</property>
<property name="iconSize">
<size>
Expand All @@ -234,24 +234,24 @@
</size>
</property>
<property name="shortcut">
<string>Ctrl+Shift+A</string>
<string>Ctrl+A</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mSelectAllButton">
<widget class="QToolButton" name="mInvertSelectionButton">
<property name="toolTip">
<string>Select all (Ctrl+A)</string>
<string>Invert selection (Ctrl+R)</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionSelectAll.png</normaloff>:/images/themes/default/mActionSelectAll.png</iconset>
<normaloff>:/images/themes/default/mActionInvertSelection.png</normaloff>:/images/themes/default/mActionInvertSelection.png</iconset>
</property>
<property name="iconSize">
<size>
Expand All @@ -260,24 +260,24 @@
</size>
</property>
<property name="shortcut">
<string>Ctrl+A</string>
<string>Ctrl+R</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mSelectedToTopButton">
<widget class="QToolButton" name="mRemoveSelectionButton">
<property name="toolTip">
<string>Move selection to top (Ctrl+T)</string>
<string>Deselect all (Ctrl+Shift+A)</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionSelectedToTop.png</normaloff>:/images/themes/default/mActionSelectedToTop.png</iconset>
<normaloff>:/images/themes/default/mActionUnselectAttributes.png</normaloff>:/images/themes/default/mActionUnselectAttributes.png</iconset>
</property>
<property name="iconSize">
<size>
Expand All @@ -286,27 +286,24 @@
</size>
</property>
<property name="shortcut">
<string>Ctrl+T</string>
</property>
<property name="checkable">
<bool>true</bool>
<string>Ctrl+Shift+A</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mInvertSelectionButton">
<widget class="QToolButton" name="mSelectedToTopButton">
<property name="toolTip">
<string>Invert selection (Ctrl+R)</string>
<string>Move selection to top (Ctrl+T)</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionInvertSelection.png</normaloff>:/images/themes/default/mActionInvertSelection.png</iconset>
<normaloff>:/images/themes/default/mActionSelectedToTop.png</normaloff>:/images/themes/default/mActionSelectedToTop.png</iconset>
</property>
<property name="iconSize">
<size>
Expand All @@ -315,7 +312,10 @@
</size>
</property>
<property name="shortcut">
<string>Ctrl+R</string>
<string>Ctrl+T</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
Expand Down

0 comments on commit f2a05f2

Please sign in to comment.