[QGIS Commit] r11017 - in trunk/qgis/src: app app/composer ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Jul 4 07:23:45 EDT 2009


Author: mhugent
Date: 2009-07-04 07:23:44 -0400 (Sat, 04 Jul 2009)
New Revision: 11017

Modified:
   trunk/qgis/src/app/composer/qgscomposerpicturewidget.cpp
   trunk/qgis/src/app/qgssinglesymboldialog.cpp
   trunk/qgis/src/ui/qgscomposerpicturewidgetbase.ui
   trunk/qgis/src/ui/qgssinglesymboldialogbase.ui
Log:
Disable drag and drop in symbol dialogs, fix for bug #1481

Modified: trunk/qgis/src/app/composer/qgscomposerpicturewidget.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposerpicturewidget.cpp	2009-07-04 08:18:58 UTC (rev 11016)
+++ trunk/qgis/src/app/composer/qgscomposerpicturewidget.cpp	2009-07-04 11:23:44 UTC (rev 11017)
@@ -265,6 +265,7 @@
     }
 
     QListWidgetItem * listItem = new QListWidgetItem( mPreviewListWidget );
+    listItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 
     if ( fileIsSvg )
     {

Modified: trunk/qgis/src/app/qgssinglesymboldialog.cpp
===================================================================
--- trunk/qgis/src/app/qgssinglesymboldialog.cpp	2009-07-04 08:18:58 UTC (rev 11016)
+++ trunk/qgis/src/app/qgssinglesymboldialog.cpp	2009-07-04 11:23:44 UTC (rev 11017)
@@ -75,6 +75,7 @@
     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;

Modified: trunk/qgis/src/ui/qgscomposerpicturewidgetbase.ui
===================================================================
--- trunk/qgis/src/ui/qgscomposerpicturewidgetbase.ui	2009-07-04 08:18:58 UTC (rev 11016)
+++ trunk/qgis/src/ui/qgscomposerpicturewidgetbase.ui	2009-07-04 11:23:44 UTC (rev 11017)
@@ -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>
@@ -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>
@@ -116,18 +122,9 @@
      <property name="spacing" >
       <number>6</number>
      </property>
-     <property name="leftMargin" >
+     <property name="margin" >
       <number>0</number>
      </property>
-     <property name="topMargin" >
-      <number>0</number>
-     </property>
-     <property name="rightMargin" >
-      <number>0</number>
-     </property>
-     <property name="bottomMargin" >
-      <number>0</number>
-     </property>
      <item>
       <widget class="QLineEdit" name="mPictureLineEdit" />
      </item>

Modified: trunk/qgis/src/ui/qgssinglesymboldialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgssinglesymboldialogbase.ui	2009-07-04 08:18:58 UTC (rev 11016)
+++ trunk/qgis/src/ui/qgssinglesymboldialogbase.ui	2009-07-04 11:23:44 UTC (rev 11017)
@@ -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>



More information about the QGIS-commit mailing list