You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tr( "Cannot transform the point to the layers coordinate system" ),
67
+
QgsMessageBar::INFO,
68
+
QgisApp::instance()->messageTimeout() );
69
+
return;
70
+
}
71
+
72
+
startCapturing();
73
+
}
74
+
elseif ( e->button() == Qt::RightButton )
75
+
{
76
+
deleteTempRubberBand();
77
+
78
+
//bring up dialog if a split was not possible (polygon) or only done once (line)
79
+
int topologicalEditing = QgsProject::instance()->readNumEntry( "Digitizing", "/TopologicalEditing", 0 );
80
+
vlayer->beginEditCommand( tr( "Parts split" ) );
81
+
int returnCode = vlayer->splitParts( points(), topologicalEditing );
82
+
vlayer->endEditCommand();
83
+
if ( returnCode == 4 )
84
+
{
85
+
QgisApp::instance()->messageBar()->pushMessage(
86
+
tr( "No part split done" ),
87
+
tr( "If there are selected parts, the split tool only applies to the selected ones. If you like to split all parts under the split line, clear the selection" ),
88
+
QgsMessageBar::WARNING,
89
+
QgisApp::instance()->messageTimeout() );
90
+
}
91
+
elseif ( returnCode == 3 )
92
+
{
93
+
QgisApp::instance()->messageBar()->pushMessage(
94
+
tr( "No part split done" ),
95
+
tr( "Cut edges detected. Make sure the line splits parts into multiple parts." ),
96
+
QgsMessageBar::WARNING,
97
+
QgisApp::instance()->messageTimeout() );
98
+
}
99
+
elseif ( returnCode == 7 )
100
+
{
101
+
QgisApp::instance()->messageBar()->pushMessage(
102
+
tr( "No part split done" ),
103
+
tr( "The geometry is invalid. Please repair before trying to split it." ) ,
104
+
QgsMessageBar::WARNING,
105
+
QgisApp::instance()->messageTimeout() );
106
+
}
107
+
elseif ( returnCode != 0 )
108
+
{
109
+
//several intersections but only one split (most likely line)
110
+
QgisApp::instance()->messageBar()->pushMessage(
111
+
tr( "Split error" ),
112
+
tr( "An error occured during feature splitting" ),
0 commit comments