-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from QGEP/refreshTopology
Use QgsTransaction to refresh network topology
- Loading branch information
Showing
2 changed files
with
64 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
/*************************************************************************** | ||
------------------- | ||
begin : 2016 | ||
copyright : (C) 2016 by OPENGIS.ch | ||
email : info@opengis.ch | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
""" | ||
|
||
from PyQt5.QtWidgets import QApplication | ||
|
||
class OverrideCursor(): | ||
|
||
def __init__(self, cursor): | ||
self.cursor = cursor | ||
|
||
def __enter__(self): | ||
QApplication.setOverrideCursor(self.cursor) | ||
|
||
def __exit__(self, exc_type, exc_val, exc_tb): | ||
QApplication.restoreOverrideCursor() |