Skip to content
Permalink
Browse files

Make sublayer dialog sortable and sort by layername initially. Patch …

…provided by Stefan Ziegler
  • Loading branch information
mhugent committed Apr 27, 2016
1 parent 11e7140 commit 42e386f8c8659264f0b2a58d1b3c9463fe198974
Showing with 9 additions and 0 deletions.
  1. +3 −0 src/gui/qgssublayersdialog.cpp
  2. +6 −0 src/ui/qgssublayersdialogbase.ui
@@ -162,6 +162,9 @@ int QgsSublayersDialog::exec()
return QDialog::Accepted;
}

layersTable->sortByColumn( 1, Qt::AscendingOrder );
layersTable->setSortingEnabled( true );

// if we got here, disable override cursor, open dialog and return result
// TODO add override cursor where it is missing (e.g. when opening via "Add Raster")
QCursor cursor;
@@ -28,6 +28,12 @@
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<attribute name="headerShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
<column>
<property name="text">
<string>1</string>

0 comments on commit 42e386f

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