Skip to content

Commit 239883d

Browse files
add plugin name, duration to all messages, error->warning
1 parent 6c059d4 commit 239883d

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎ai_tracer.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@ def canvasReleaseEvent(self, e):
221221
vlayer = self.plugin.iface.activeLayer()
222222
if not isinstance(vlayer, QgsVectorLayer):
223223
self.plugin.iface.messageBar().pushMessage(
224-
"Info",
224+
"Bunting Labs AI Vectorizer",
225225
"No active vector layer.",
226-
Qgis.Info)
226+
Qgis.Warning,
227+
duration=15)
227228
return
228229

229230
# Will be converted to the relevant geometry

‎plugin.py‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ def initTracer(self):
7474
self.tracer = AIVectorizerTool(self, QgsMapToolCapture.CapturePolygon)
7575
else:
7676
self.iface.messageBar().pushMessage(
77-
"Error",
77+
"Bunting Labs AI Vectorizer",
7878
"Unsupported vector layer type for AI autocomplete.",
79-
Qgis.Critical)
79+
Qgis.Warning,
80+
duration=15)
8081

8182
def initGui(self):
8283
# Initialize the plugin GUI
@@ -131,7 +132,12 @@ def saveSettings(self):
131132
api_key = self.api_key_input.text()
132133
self.settings.setValue("buntinglabs-qgis-plugin/api_key", api_key)
133134

134-
self.iface.messageBar().pushMessage("Success", "API key changed successfully.", Qgis.Info, duration=10)
135+
self.iface.messageBar().pushMessage(
136+
"Bunting Labs AI Vectorizer",
137+
"Settings saved successfully.",
138+
Qgis.Info,
139+
duration=10
140+
)
135141

136142
self.api_key_dialog.close()
137143

0 commit comments

Comments
 (0)