Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correct use of ellipsis in style menus (fix #10549)
  • Loading branch information
nyalldawson committed Jul 13, 2015
1 parent 36992b3 commit d36cd02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsmaplayerstyleguiutils.cpp
Expand Up @@ -33,7 +33,7 @@ QgsMapLayerStyleGuiUtils* QgsMapLayerStyleGuiUtils::instance()

QAction* QgsMapLayerStyleGuiUtils::actionAddStyle( QgsMapLayer* layer, QObject* parent )
{
QAction* a = new QAction( tr( "Add" ), parent );
QAction* a = new QAction( tr( "Add..." ), parent );
a->setData( QVariant::fromValue<QObject*>( layer ) );
connect( a, SIGNAL( triggered() ), this, SLOT( addStyle() ) );
return a;
Expand All @@ -50,7 +50,7 @@ QAction* QgsMapLayerStyleGuiUtils::actionRemoveStyle( QgsMapLayer* layer, QObjec

QAction* QgsMapLayerStyleGuiUtils::actionRenameStyle( QgsMapLayer* layer, QObject* parent )
{
QAction* a = new QAction( tr( "Rename Current" ), parent );
QAction* a = new QAction( tr( "Rename Current..." ), parent );
a->connect( a, SIGNAL( triggered() ), this, SLOT( renameStyle() ) );
a->setData( QVariant::fromValue<QObject*>( layer ) );
return a;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -97,7 +97,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
m->addAction( tr( "Load Style..." ), this, SLOT( loadStyle_clicked() ) );
m->addAction( tr( "Save Style..." ), this, SLOT( saveStyleAs_clicked() ) );
m->addSeparator();
m->addAction( tr( "Save As Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
m->addAction( tr( "Save as Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
m->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultStyle_clicked() ) );
b->setMenu( m );
connect( m, SIGNAL( aboutToShow() ), this, SLOT( aboutToShowStyleMenu() ) );
Expand Down
12 changes: 6 additions & 6 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -92,10 +92,10 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(

QPushButton* b = new QPushButton( tr( "Style" ) );
QMenu* m = new QMenu( this );
mActionLoadStyle = m->addAction( tr( "Load Style..." ), this, SLOT( loadStyle_clicked() ) );
mActionSaveStyleAs = m->addAction( tr( "Save Style..." ), this, SLOT( saveStyleAs_clicked() ) );
mActionLoadStyle = m->addAction( tr( "Load Style" ), this, SLOT( loadStyle_clicked() ) );
mActionSaveStyleAs = m->addAction( tr( "Save Style" ), this, SLOT( saveStyleAs_clicked() ) );
m->addSeparator();
m->addAction( tr( "Save As Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
m->addAction( tr( "Save as Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
m->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultStyle_clicked() ) );
b->setMenu( m );
connect( m, SIGNAL( aboutToShow() ), this, SLOT( aboutToShowStyleMenu() ) );
Expand Down Expand Up @@ -161,15 +161,15 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(

// Create the menu for the save style button to choose the output format
mSaveAsMenu = new QMenu( this );
mSaveAsMenu->addAction( tr( "QGIS Layer Style File" ) );
mSaveAsMenu->addAction( tr( "SLD File" ) );
mSaveAsMenu->addAction( tr( "QGIS Layer Style File..." ) );
mSaveAsMenu->addAction( tr( "SLD File..." ) );

//Only if the provider support loading & saving styles to db add new choices
if ( layer->dataProvider()->isSaveAndLoadStyleToDBSupported() )
{
//for loading
mLoadStyleMenu = new QMenu();
mLoadStyleMenu->addAction( tr( "Load from file" ) );
mLoadStyleMenu->addAction( tr( "Load from file..." ) );
mLoadStyleMenu->addAction( tr( "Load from database" ) );
//mActionLoadStyle->setContextMenuPolicy( Qt::PreventContextMenu );
mActionLoadStyle->setMenu( mLoadStyleMenu );
Expand Down

0 comments on commit d36cd02

Please sign in to comment.