Ver código fonte

wxGUI/vdigit: breakLines moved to Digit class (update https://trac.osgeo.org/grass/changeset/32289)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32291 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 17 anos atrás
pai
commit
4210dd1c40

+ 13 - 1
gui/wxpython/vdigit/digit.cpp

@@ -38,7 +38,7 @@ Digit::Digit(DisplayDriver *ddriver)
 }
 }
 
 
 /**
 /**
-   Digit class destructor
+   \brief Digit class destructor
 
 
    Frees changeset structure
    Frees changeset structure
 */
 */
@@ -48,3 +48,15 @@ Digit::~Digit()
 	FreeChangeset(changeset);
 	FreeChangeset(changeset);
     }
     }
 }
 }
+
+/**
+   \brief Update digit settings
+
+   \param breakLines break lines on intersection
+*/
+void Digit::UpdateSettings(bool breakLines)
+{
+    settings.breakLines = breakLines;
+
+    return;
+}

+ 8 - 0
gui/wxpython/vdigit/digit.h

@@ -27,6 +27,12 @@ private:
 	struct line_pnts *Points;
 	struct line_pnts *Points;
 	struct line_cats *Cats;
 	struct line_cats *Cats;
     };
     };
+
+    /* settings */
+    struct _settings {
+	bool breakLines;
+    } settings;
+
     std::map<int, std::vector<action_meta> > changesets;
     std::map<int, std::vector<action_meta> > changesets;
     int changesetCurrent;  /* first changeset to apply */
     int changesetCurrent;  /* first changeset to apply */
     int changesetDead;     /* first dead changeset */
     int changesetDead;     /* first dead changeset */
@@ -81,6 +87,8 @@ public:
 
 
     int Undo(int);
     int Undo(int);
     int GetUndoLevel();
     int GetUndoLevel();
+
+    void UpdateSettings(bool);
 };
 };
 
 
 #endif /* WXVDIGIT_DIGIT_H */
 #endif /* WXVDIGIT_DIGIT_H */

+ 1 - 3
gui/wxpython/vdigit/driver.cpp

@@ -818,7 +818,7 @@ void DisplayDriver::UpdateSettings(unsigned long highlight,
 				   bool eVertex,      unsigned long cVertex,
 				   bool eVertex,      unsigned long cVertex,
 				   bool eArea,        unsigned long cArea,
 				   bool eArea,        unsigned long cArea,
 				   bool eDirection,   unsigned long cDirection,
 				   bool eDirection,   unsigned long cDirection,
-				   int lineWidth, bool breakLines)
+				   int lineWidth)
 {
 {
     settings.highlight.Set(highlight);
     settings.highlight.Set(highlight);
     
     
@@ -865,8 +865,6 @@ void DisplayDriver::UpdateSettings(unsigned long highlight,
     settings.direction.color.Set(cDirection);
     settings.direction.color.Set(cDirection);
 
 
     settings.lineWidth = lineWidth;
     settings.lineWidth = lineWidth;
-    
-    settings.breakLines = breakLines;
 
 
     return;
     return;
 }
 }

+ 1 - 3
gui/wxpython/vdigit/driver.h

@@ -112,8 +112,6 @@ private:
 	symbol direction;
 	symbol direction;
 
 
 	int lineWidth;    // screen units 
 	int lineWidth;    // screen units 
-
-	bool breakLines;
     } settings;
     } settings;
 
 
     struct _topology {
     struct _topology {
@@ -214,7 +212,7 @@ public:
 			bool, unsigned long,
 			bool, unsigned long,
 			bool, unsigned long,
 			bool, unsigned long,
 			bool, unsigned long,
 			bool, unsigned long,
-			int, bool);
+			int);
 };
 };
 
 
 int print_error(const char *, int);
 int print_error(const char *, int);