macOS drops us into "/" when opening the app bundle without a file. use $HOME instead.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(lammps-gui VERSION 1.5.0 LANGUAGES CXX)
|
||||
project(lammps-gui VERSION 1.5.1 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
@ -113,6 +113,8 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) :
|
||||
capturer = new StdCapture;
|
||||
current_file.clear();
|
||||
current_dir = QDir(".").absolutePath();
|
||||
// use $HOME if we get dropped to "/" like on macOS
|
||||
if (current_dir == "/") current_dir = QDir::homePath();
|
||||
|
||||
QCoreApplication::setOrganizationName("The LAMMPS Developers");
|
||||
QCoreApplication::setOrganizationDomain("lammps.org");
|
||||
|
||||
Reference in New Issue
Block a user