You can achieve this by changing the source code of the plugin. Otherwise, the plugin uses the name temp
for each output file.
Open mmqgis_dialogs.py
file in MMQGIS Plugin folder (Settings > User Profiles > Open Active Profile Folder
, navigate to python/plugins/mmqgis
)
Change mmqgis_temp_file_name
method (line ~260) in mmqgis_dialog
class as follows:
def mmqgis_temp_file_name(self, suffix, name=None):
project = QgsProject.instance()
home_path = project.homePath()
if not home_path:
home_path = os.getcwd()
for x in range(1, 10):
if name:
name = home_path + "/" + name + str(x) + suffix
else:
name = home_path + "/temp" + str(x) + suffix
if not os.path.isfile(name):
return name
return home_path + "/temp" + suffix
Find and change the following line (between approx. line 2170-2175):
self.output_file_name.setFilePath(self.mmqgis_temp_file_name(".kml"))
to
self.output_file_name.setFilePath(self.mmqgis_temp_file_name(".kml", self.input_layer_name.currentText()))
And add the following line (same as above) to changelayers
method (approx. line 2175-2180):
self.output_file_name.setFilePath(self.mmqgis_temp_file_name(".kml", self.input_layer_name.currentText()))