Skip to content
Permalink
Browse files

identify: fix form button icon & tooltip, remove close button

  • Loading branch information
jef-n committed Apr 25, 2014
1 parent ea98608 commit 7203cffdc5eb2c58a3613b2fe59b67992d8cf983
Showing with 11 additions and 12 deletions.
  1. +10 −4 src/app/qgsidentifyresultsdialog.cpp
  2. +1 −8 src/ui/qgsidentifyresultsbase.ui
@@ -446,7 +446,7 @@ void QgsIdentifyResultsDialog::addFeature( QgsVectorLayer *vlayer, const QgsFeat
if ( vlayer->pendingFields().size() > 0 )
{
QTreeWidgetItem *editItem = new QTreeWidgetItem( QStringList() << "" << ( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ) ) );
editItem->setIcon( 0, QgsApplication::getThemeIcon( vlayer->isEditable() ? "/mIconEditable.png" : "/mIconEditable.png" ) );
editItem->setIcon( 0, QgsApplication::getThemeIcon( "/mActionPropertyItem.png" ) );
editItem->setData( 0, Qt::UserRole, "edit" );
actionItem->addChild( editItem );
}
@@ -634,8 +634,8 @@ void QgsIdentifyResultsDialog::editingToggled()
continue;

QTreeWidgetItem *editItem = actions->child( j );
editItem->setIcon( 0, QgsApplication::getThemeIcon( vlayer->isEditable() ? "/mIconEditable.png" : "/mIconEditable.png" ) );
editItem->setText( 1, vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ) );
mOpenFormButton->setToolTip( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ) );
editItem->setText( 1, mOpenFormButton->toolTip() );
}
}

@@ -758,7 +758,7 @@ void QgsIdentifyResultsDialog::contextMenuEvent( QContextMenuEvent* event )
if ( vlayer )
{
mActionPopup->addAction(
QgsApplication::getThemeIcon( vlayer->isEditable() ? "/mIconEditable.png" : "/mIconEditable.png" ),
QgsApplication::getThemeIcon( "/mActionPropertyItem.png" ),
vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ),
this, SLOT( featureForm() ) );
}
@@ -1099,6 +1099,12 @@ void QgsIdentifyResultsDialog::handleCurrentItemChanged( QTreeWidgetItem *curren
mCopyToolButton->setEnabled( featItem && featItem->feature().isValid() );
mOpenFormButton->setEnabled( featItem && featItem->feature().isValid() );

QgsVectorLayer *vlayer = vectorLayer( current );
if( vlayer )
{
mOpenFormButton->setToolTip( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ) );
}

if ( !current )
{
emit selectedFeatureChanged( 0, 0 );
@@ -44,16 +44,9 @@
</item>
<item>
<widget class="QToolButton" name="mOpenFormButton">
<property name="toolTip">
<string>Expand tree.</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionToggleEditing.png</normaloff>:/images/themes/default/mActionToggleEditing.png</iconset>
</property>
</widget>
</item>
<item>
@@ -189,7 +182,7 @@
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
<set>QDialogButtonBox::Help</set>
</property>
<property name="centerButtons">
<bool>false</bool>

0 comments on commit 7203cff

Please sign in to comment.
You can’t perform that action at this time.