Skip to content

Commit

Permalink
Disable drag and drop in symbol dialogs, fix for bug #1481
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11017 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 4, 2009
1 parent dff7910 commit e7c8bbc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/app/composer/qgscomposerpicturewidget.cpp
Expand Up @@ -265,6 +265,7 @@ int QgsComposerPictureWidget::addDirectoryToPreview( const QString& path )
}

QListWidgetItem * listItem = new QListWidgetItem( mPreviewListWidget );
listItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );

if ( fileIsSvg )
{
Expand Down
1 change: 1 addition & 0 deletions src/app/qgssinglesymboldialog.cpp
Expand Up @@ -75,6 +75,7 @@ QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disab
mypItem->setText( "" );
//store the symbol offset in the UserData role for later retrieval
mypItem->setData( Qt::UserRole, *it );
mypItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
if ( layer->geometryType() != QGis::Point )
{
break;
Expand Down
19 changes: 8 additions & 11 deletions src/ui/qgscomposerpicturewidgetbase.ui
Expand Up @@ -36,7 +36,7 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>101</width>
<height>20</height>
Expand Down Expand Up @@ -85,6 +85,12 @@
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QListWidget" name="mPreviewListWidget" >
<property name="showDropIndicator" stdset="0" >
<bool>false</bool>
</property>
<property name="dragDropMode" >
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="movement" >
<enum>QListView::Free</enum>
</property>
Expand Down Expand Up @@ -116,16 +122,7 @@
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="margin" >
<number>0</number>
</property>
<item>
Expand Down
5 changes: 4 additions & 1 deletion src/ui/qgssinglesymboldialogbase.ui
Expand Up @@ -78,8 +78,11 @@
<layout class="QGridLayout" >
<item row="0" column="0" colspan="3" >
<widget class="QListWidget" name="lstSymbols" >
<property name="showDropIndicator" stdset="0" >
<bool>false</bool>
</property>
<property name="dragDropMode" >
<enum>QAbstractItemView::DragDrop</enum>
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="alternatingRowColors" >
<bool>false</bool>
Expand Down

0 comments on commit e7c8bbc

Please sign in to comment.