516 |
516 |
updateProjectFromTemplates();
|
517 |
517 |
legendLayerSelectionChanged();
|
518 |
518 |
activateDeactivateLayerRelatedActions( NULL );
|
|
519 |
mSaveRollbackInProgress = false;
|
519 |
520 |
|
520 |
521 |
addDockWidget( Qt::LeftDockWidgetArea, mUndoWidget );
|
521 |
522 |
mUndoWidget->hide();
|
... | ... | |
5248 |
5249 |
if ( !vlayer || !vlayer->isEditable() || !vlayer->isModified() )
|
5249 |
5250 |
return;
|
5250 |
5251 |
|
|
5252 |
if ( vlayer == activeLayer() )
|
|
5253 |
mSaveRollbackInProgress = true;
|
|
5254 |
|
5251 |
5255 |
if ( !vlayer->commitChanges() )
|
5252 |
5256 |
{
|
|
5257 |
mSaveRollbackInProgress = false;
|
5253 |
5258 |
QMessageBox::information( 0,
|
5254 |
5259 |
tr( "Error" ),
|
5255 |
5260 |
tr( "Could not commit changes to layer %1\n\nErrors: %2\n" )
|
... | ... | |
5270 |
5275 |
if ( !vlayer || !vlayer->isEditable() )
|
5271 |
5276 |
return;
|
5272 |
5277 |
|
|
5278 |
if ( vlayer == activeLayer() && leaveEditable )
|
|
5279 |
mSaveRollbackInProgress = true;
|
|
5280 |
|
5273 |
5281 |
if ( !vlayer->rollBack() )
|
5274 |
5282 |
{
|
|
5283 |
mSaveRollbackInProgress = false;
|
5275 |
5284 |
QMessageBox::information( 0,
|
5276 |
5285 |
tr( "Error" ),
|
5277 |
5286 |
tr( "Could not %1 changes to layer %2\n\nErrors: %3\n" )
|
... | ... | |
7309 |
7318 |
if ( layer && layer == activeLayer() )
|
7310 |
7319 |
{
|
7311 |
7320 |
activateDeactivateLayerRelatedActions( layer );
|
|
7321 |
mSaveRollbackInProgress = false;
|
7312 |
7322 |
}
|
7313 |
7323 |
}
|
7314 |
7324 |
|
... | ... | |
7449 |
7459 |
mActionCopyFeatures->setEnabled( layerHasSelection );
|
7450 |
7460 |
mActionFeatureAction->setEnabled( layerHasActions );
|
7451 |
7461 |
|
7452 |
|
if ( !vlayer->isEditable() && mMapCanvas->mapTool() && mMapCanvas->mapTool()->isEditTool() )
|
|
7462 |
if ( !vlayer->isEditable() && mMapCanvas->mapTool()
|
|
7463 |
&& mMapCanvas->mapTool()->isEditTool() && !mSaveRollbackInProgress )
|
7453 |
7464 |
{
|
7454 |
7465 |
mMapCanvas->setMapTool( mNonEditMapTool );
|
7455 |
7466 |
}
|