Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload SVG Symbology Directory #11177

Closed
qgib opened this issue May 29, 2008 · 3 comments
Closed

Reload SVG Symbology Directory #11177

qgib opened this issue May 29, 2008 · 3 comments
Labels
Feature Request Symbology Related to vector layer symbology or renderers
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented May 29, 2008

Author Name: otternase - (otternase -)
Original Redmine Issue: 1117

Redmine category:symbology
Assignee: Tim Sutton


Environment: qgis 0.9.1 Ubuntu 7.10

Problem:

Qgis is loading the catalogue of available SVGs for symbology only on startup, so if after starting Qgis a new SVG is created or a SVG is deleted, the catalogue is not updated accordingly and the new SVG is not available in the Symbologydialog. As my plugin is creating new SVGs on runtime, which I want to be available in the Dialog, I tried this:

Suggestion:
I changed qgsmarkercatalogue.cpp like this:


@@ -36,8 +36,13 @@

[[QgsMarkerCatalogue]]::QgsMarkerCatalogue()
{

  • // Init list
  • updateMarkerCatalogue();
    +}

+void [[QgsMarkerCatalogue]]::updateMarkerCatalogue()
+{

  • // Init list

  • mList.clear();
    // Hardcoded markers
    mList.append ( "hard:circle" );
    mList.append ( "hard:rectangle" );
    @@ -69,6 +74,7 @@
    }
    }

QStringList [[QgsMarkerCatalogue]]::list()
{
return mList;

and qgsmarkercatalogue.h accordingly:


@@ -53,6 +53,8 @@
/** Returns a pixmap given a filename of a svg marker
****** NOTE: this method needs to be public static for [[QgsMarkerDialog]]::visualizeMarkers */
static void svgMarker (QPainter * thepPainter, QString name, int size );
+

  • void updateMarkerCatalogue();
    private:

    /*Constructor/


Now every time my plugin is constructing a new SVG, I call the updateMarkerCatalogue() like this


    [[QgsMarkerCatalogue]] *markerCatalogue=QgsMarkerCatalogue::instance();
    markerCatalogue->updateMarkerCatalogue();

Tested in above named environment and it worked fine.

If this change is accepted there would probably even be the opportunity to do this [[MarkerCatalogue]] Update every time the Symbology Dialog is opened automatically???

@qgib
Copy link
Contributor Author

qgib commented Sep 12, 2008

Author Name: Paolo Cavallini (@pcav)


What is your plugin? Is it available somewhere?

@qgib
Copy link
Contributor Author

qgib commented Jul 22, 2009

Author Name: Giovanni Manghi (@gioman)


hi,

a) is the plugin available somewhere?

b) has this patch already been evaluated/committed by the devs?

@qgib
Copy link
Contributor Author

qgib commented Jul 23, 2009

Author Name: Jürgen Fischer (@jef-n)


Replying to [comment:2 lutra]:

hi,

a) is the plugin available somewhere?

b) has this patch already been evaluated/committed by the devs?

0c59c74 (SVN r11153) also covers this


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

@qgib qgib added Feature Request Symbology Related to vector layer symbology or renderers labels May 24, 2019
@qgib qgib added this to the Version 1.0.3 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

No branches or pull requests

1 participant