mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix for ticket #226 (saved projects with postgres layers in a map composition won't reload).
git-svn-id: http://svn.osgeo.org/qgis/trunk@5730 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
744f78f610
commit
f880882db4
@ -73,7 +73,13 @@ QgsMapLayer::QgsMapLayer(int type,
|
||||
// Generate the unique ID of this layer
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
ID = lyrname + dt.toString("yyyyMMddhhmmsszzz");
|
||||
ID.replace(" ", "_");
|
||||
// Tidy the ID up to avoid characters that may cause problems
|
||||
// elsewhere (e.g in some parts of XML). Replaces every non-word
|
||||
// character (word characters are the alphabet, numbers and
|
||||
// underscore) with an underscore.
|
||||
// Note that the first backslashe in the regular expression is
|
||||
// there for the compiler, so the pattern is actually \W
|
||||
ID.replace(QRegExp("[\\W]"), "_");
|
||||
|
||||
QString myThemePath = QgsApplication::themePath();
|
||||
mInOverviewPixmap.load(myThemePath + "/mActionInOverview.png");
|
||||
|
Loading…
x
Reference in New Issue
Block a user